From b98e5d0dc8c472972e4e255b2df075bc656de39f Mon Sep 17 00:00:00 2001 From: Shahana Farooqui Date: Wed, 8 Dec 2021 21:51:47 -0500 Subject: [PATCH] ECL & CLT Dashboard Layouts ECL & CLT Dashboard Layouts --- angular/142.2d038d60292a09c8.js | 1 - angular/142.ed7fc40bd089bbbb.js | 1 + angular/871.027975287965ae24.js | 1 - angular/871.d455809c35893640.js | 1 + angular/index.html | 2 +- ...untime.1e33a008846eee2d.js => runtime.2b7c60010dbc2ffd.js} | 2 +- src/app/clightning/home/home.component.ts | 4 +--- src/app/eclair/home/home.component.ts | 2 -- 8 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 angular/142.2d038d60292a09c8.js create mode 100644 angular/142.ed7fc40bd089bbbb.js delete mode 100644 angular/871.027975287965ae24.js create mode 100644 angular/871.d455809c35893640.js rename angular/{runtime.1e33a008846eee2d.js => runtime.2b7c60010dbc2ffd.js} (94%) diff --git a/angular/142.2d038d60292a09c8.js b/angular/142.2d038d60292a09c8.js deleted file mode 100644 index 17efba57..00000000 --- a/angular/142.2d038d60292a09c8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[142],{142:(hd,he,_)=>{_.r(he),_.d(he,{CLModule:()=>fd});var u=_(6019),C=_(7292),Ve=_(7362),e=_(3668),p=_(2438),P=_(9009);function ze(n,a){1&n&&e._UZ(0,"mat-progress-bar",3)}let ge=(()=>{class n{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(i=>{switch(!0){case i instanceof C.OD:this.loading=!0;break;case i instanceof C.m2:case i instanceof C.gk:case i instanceof C.Q3:this.loading=!1}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,ze,1,0,"mat-progress-bar",1),e._UZ(2,"router-outlet",null,2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",i.loading))},directives:[p.xw,p.yH,p.Wh,u.O5,C.lC,P.pW],styles:[""],data:{animation:[Ve.g]}}),n})();var m=_(7396),f=_(5022),ie=_(1818),Ce=_(6424),x=_(9594),s=_(4798),h=_(7634),F=_(507),b=_(7852),H=_(6309),O=_(4234),N=_(3868),ae=_(6167),Z=_(888),ue=_(3530),q=_(8866),U=_(86),pe=_(9112);const xe=function(n){return{backgroundColor:n}};function Ge(n,a){if(1&n&&e._UZ(0,"span",6),2&n){const t=e.oxw();e.Q6J("ngStyle",e.VKq(1,xe,"#"+(null==t.information?null:t.information.color)))}}function Xe(n,a){if(1&n&&(e.TgZ(0,"div"),e.TgZ(1,"h4",1),e._uU(2,"Color"),e.qZA(),e.TgZ(3,"div",2),e._UZ(4,"span",7),e._uU(5),e.ALo(6,"uppercase"),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngStyle",e.VKq(4,xe,"#"+(null==t.information?null:t.information.color))),e.xp6(1),e.hij(" ",e.lcZ(6,2,null==t.information?null:t.information.color)," ")}}function We(n,a){if(1&n&&(e.TgZ(0,"span",2),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t)}}let Te=(()=>{class n{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain)+" "+this.commonService.titleCase(t.network))}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[e.TTD],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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div"),e.TgZ(2,"h4",1),e._uU(3,"Alias"),e.qZA(),e.TgZ(4,"div",2),e._uU(5),e.YNc(6,Ge,1,3,"span",3),e.qZA(),e.qZA(),e.YNc(7,Xe,7,6,"div",4),e.TgZ(8,"div"),e.TgZ(9,"h4",1),e._uU(10,"Implementation"),e.qZA(),e.TgZ(11,"div",2),e._uU(12),e.qZA(),e.qZA(),e.TgZ(13,"div"),e.TgZ(14,"h4",1),e._uU(15,"Chain"),e.qZA(),e.YNc(16,We,2,1,"span",5),e.qZA(),e.qZA()),2&t&&(e.xp6(5),e.hij(" ",null==i.information?null:i.information.alias," "),e.xp6(1),e.Q6J("ngIf",!i.showColorFieldSeparately),e.xp6(1),e.Q6J("ngIf",i.showColorFieldSeparately),e.xp6(5),e.Oqu(null!=i.information&&i.information.lnImplementation||null!=i.information&&i.information.version?(null==i.information?null:i.information.lnImplementation)+" "+(null==i.information?null:i.information.version):""),e.xp6(4),e.Q6J("ngForOf",i.chains))},directives:[p.xw,p.yH,p.Wh,u.O5,u.sg,u.PC,q.Zl],pipes:[u.gd],styles:[""]}),n})();function Ke(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div"),e.TgZ(2,"h4",3),e._uU(3,"Lightning"),e.qZA(),e.TgZ(4,"div",4),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",5),e.qZA(),e.TgZ(8,"div"),e.TgZ(9,"h4",3),e._uU(10,"On-chain"),e.qZA(),e.TgZ(11,"div",4),e._uU(12),e.ALo(13,"number"),e.qZA(),e._UZ(14,"mat-progress-bar",5),e.qZA(),e.TgZ(15,"div"),e.TgZ(16,"h4",3),e._uU(17,"Total"),e.qZA(),e.TgZ(18,"div",4),e._uU(19),e.ALo(20,"number"),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(5),e.hij("",e.lcZ(6,5,t.balances.lightning)," Sats"),e.xp6(2),e.s9C("value",t.balances.lightning/t.balances.total*100),e.xp6(5),e.hij("",e.lcZ(13,7,t.balances.onchain)," Sats"),e.xp6(2),e.s9C("value",t.balances.onchain/t.balances.total*100),e.xp6(5),e.hij("",e.lcZ(20,9,t.balances.total)," Sats")}}function $e(n,a){if(1&n&&(e.TgZ(0,"div",6),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let je=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,Ke,21,11,"div",0),e.YNc(1,$e,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,P.pW],pipes:[u.JJ],styles:[""]}),n})();var g=_(8167),Q=_(7444),G=_(5694),Y=_(7706);function et(n,a){if(1&n&&(e.TgZ(0,"div",19),e.TgZ(1,"span",20),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",6),e.TgZ(5,"mat-hint",21),e.TgZ(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",22),e._UZ(11,"fa-icon",23),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",24),e.TgZ(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA(),e.qZA(),e._UZ(19,"mat-progress-bar",25),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.alias||t.id),e.s9C("matTooltipDisabled",(t.alias||t.id).length<26),e.xp6(1),e.AsE("",e.Dn7(3,9,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":"",""),e.xp6(6),e.hij("",e.xi3(9,13,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats"),e.xp6(3),e.Q6J("icon",i.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,16,t.balancedness||0),") "),e.xp6(5),e.hij("",e.xi3(18,18,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats"),e.xp6(2),e.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function tt(n,a){if(1&n&&(e.TgZ(0,"div",17),e.YNc(1,et,20,21,"div",18),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.activeChannels)}}function nt(n,a){if(1&n&&(e.TgZ(0,"div",3),e.TgZ(1,"div",4),e.TgZ(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"div",6),e.TgZ(5,"mat-hint",7),e.TgZ(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",9),e._UZ(11,"fa-icon",10),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",11),e.TgZ(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA(),e.qZA(),e._UZ(19,"mat-progress-bar",12),e.qZA(),e.TgZ(20,"div",13),e._UZ(21,"mat-divider",14),e.qZA(),e.TgZ(22,"div",15),e.YNc(23,tt,2,1,"div",16),e.qZA(),e.qZA()),2&n){const t=e.oxw(),i=e.MAs(2);e.xp6(8),e.hij("",e.xi3(9,7,(null==t.channelBalances?null:t.channelBalances.localBalance)||0,"1.0-0")," Sats"),e.xp6(3),e.Q6J("icon",t.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,10,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),e.xp6(5),e.hij("",e.xi3(18,12,(null==t.channelBalances?null:t.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),e.xp6(2),e.s9C("value",null!=t.channelBalances&&t.channelBalances.localBalance&&(null==t.channelBalances?null:t.channelBalances.localBalance)>0?+(null==t.channelBalances?null:t.channelBalances.localBalance)/(+(null==t.channelBalances?null:t.channelBalances.localBalance)+ +(null==t.channelBalances?null:t.channelBalances.remoteBalance))*100:0),e.xp6(4),e.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",i)}}function it(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",26),e._uU(1," No channels available. "),e.TgZ(2,"button",27),e.NdJ("click",function(){return e.CHM(t),e.oxw().goToChannels()}),e._uU(3,"Open Channel"),e.qZA(),e.qZA()}}function at(n,a){if(1&n&&(e.TgZ(0,"div",28),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let ot=(()=>{class n{constructor(t){this.router=t,this.faBalanceScale=x.DL8,this.faDumbbell=x.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",activeChannels:"activeChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,nt,24,15,"div",0),e.YNc(1,it,4,0,"ng-template",null,1,e.W1O),e.YNc(3,at,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,g.bx,N.BN,Q.gM,P.pW,G.d,Y.$V,u.sg,U.lW],pipes:[u.JJ,u.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function st(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div"),e.TgZ(3,"h4",4),e._uU(4,"Total"),e.qZA(),e.TgZ(5,"div",5),e._uU(6),e.ALo(7,"number"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",3),e.TgZ(9,"div"),e.TgZ(10,"h4",4),e._uU(11,"Transactions"),e.qZA(),e.TgZ(12,"div",5),e._uU(13),e.ALo(14,"number"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.hij("",e.lcZ(7,2,(null==t.fees?null:t.fees.feeCollected)/1e3)," Sats"),e.xp6(7),e.Oqu(e.lcZ(14,4,null==t.fees?null:t.fees.totalTxCount))}}function lt(n,a){if(1&n&&(e.TgZ(0,"div",6),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let ye=(()=>{class n{constructor(){this.totalFees=[{name:"Total",value:0}]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,st,15,6,"div",0),e.YNc(1,lt,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function rt(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div"),e.TgZ(3,"h4",4),e._uU(4,"Active"),e.qZA(),e.TgZ(5,"div",5),e._UZ(6,"span",6),e._uU(7),e.ALo(8,"number"),e.qZA(),e.qZA(),e.TgZ(9,"div"),e.TgZ(10,"h4",4),e._uU(11,"Pending"),e.qZA(),e.TgZ(12,"div",5),e._UZ(13,"span",7),e._uU(14),e.ALo(15,"number"),e.qZA(),e.qZA(),e.TgZ(16,"div"),e.TgZ(17,"h4",4),e._uU(18,"Inactive"),e.qZA(),e.TgZ(19,"div",5),e._UZ(20,"span",8),e._uU(21),e.ALo(22,"number"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(23,"div",3),e.TgZ(24,"div"),e.TgZ(25,"h4",4),e._uU(26,"Capacity"),e.qZA(),e.TgZ(27,"div",5),e._uU(28),e.ALo(29,"number"),e.qZA(),e.qZA(),e.TgZ(30,"div"),e.TgZ(31,"h4",4),e._uU(32,"Capacity"),e.qZA(),e.TgZ(33,"div",5),e._uU(34),e.ALo(35,"number"),e.qZA(),e.qZA(),e.TgZ(36,"div"),e.TgZ(37,"h4",4),e._uU(38,"Capacity"),e.qZA(),e.TgZ(39,"div",5),e._uU(40),e.ALo(41,"number"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(7),e.Oqu(e.lcZ(8,6,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.channels)||0)),e.xp6(7),e.Oqu(e.lcZ(15,8,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.channels)||0)),e.xp6(7),e.Oqu(e.lcZ(22,10,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.channels)||0)),e.xp6(7),e.hij("",e.lcZ(29,12,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(35,14,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(41,16,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.capacity)||0)," Sats")}}function ct(n,a){if(1&n&&(e.TgZ(0,"div",9),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Ze=(()=>{class n{constructor(){this.channelsStatus={active:{},pending:{},inactive:{}}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,rt,42,18,"div",0),e.YNc(1,ct,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function ut(n,a){if(1&n&&(e.TgZ(0,"mat-hint",19),e.TgZ(1,"strong",20),e._uU(2,"Capacity: "),e.qZA(),e._uU(3),e.ALo(4,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.hij("",e.xi3(4,1,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats")}}function pt(n,a){if(1&n&&(e.TgZ(0,"mat-hint",19),e.TgZ(1,"strong",20),e._uU(2,"Capacity: "),e.qZA(),e._uU(3),e.ALo(4,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.hij("",e.xi3(4,1,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats")}}function mt(n,a){if(1&n&&e._UZ(0,"mat-progress-bar",21),2&n){const t=e.oxw().$implicit,i=e.oxw(3);e.s9C("value",i.totalLiquidity>0?(+t.msatoshi_to_them/1e3||0)/i.totalLiquidity*100:0)}}function dt(n,a){if(1&n&&e._UZ(0,"mat-progress-bar",21),2&n){const t=e.oxw().$implicit,i=e.oxw(3);e.s9C("value",i.totalLiquidity>0?(+t.msatoshi_to_us/1e3||0)/i.totalLiquidity*100:0)}}function ft(n,a){if(1&n&&(e.TgZ(0,"div",14),e.TgZ(1,"span",15),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",16),e.YNc(5,ut,5,4,"mat-hint",17),e.YNc(6,pt,5,4,"mat-hint",17),e.qZA(),e.YNc(7,mt,1,1,"mat-progress-bar",18),e.YNc(8,dt,1,1,"mat-progress-bar",18),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.alias||t.id),e.s9C("matTooltipDisabled",(t.alias||t.id).length<26),e.xp6(1),e.AsE("",e.Dn7(3,8,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":"",""),e.xp6(3),e.Q6J("ngIf","In"===i.direction),e.xp6(1),e.Q6J("ngIf","Out"===i.direction),e.xp6(1),e.Q6J("ngIf","In"===i.direction),e.xp6(1),e.Q6J("ngIf","Out"===i.direction)}}function _t(n,a){if(1&n&&(e.TgZ(0,"div",12),e.YNc(1,ft,9,12,"div",13),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.activeChannels)}}const ht=function(n,a,t){return{"mb-4":n,"mb-2":a,"mb-1":t}};function gt(n,a){if(1&n&&(e.TgZ(0,"div",3),e.TgZ(1,"div",4),e.TgZ(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"mat-hint",6),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",7),e.qZA(),e.TgZ(8,"div",8),e._UZ(9,"mat-divider",9),e.qZA(),e.TgZ(10,"div",10),e.YNc(11,_t,2,1,"div",11),e.qZA(),e.qZA()),2&n){const t=e.oxw(),i=e.MAs(2);e.Q6J("ngClass",e.kEZ(7,ht,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(5),e.hij("",e.xi3(6,4,t.totalLiquidity,"1.0-0")," Sats"),e.xp6(6),e.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",i)}}function Ct(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).goToChannels()}),e._uU(1,"Open Channel"),e.qZA()}}function xt(n,a){if(1&n&&(e.TgZ(0,"div",22),e._uU(1," No channels available. "),e.YNc(2,Ct,2,0,"button",23),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngIf","Out"===t.direction)}}function Tt(n,a){if(1&n&&(e.TgZ(0,"div",25),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let yt=(()=>{class n{constructor(t,i){this.router=t,this.commonService=i,this.screenSize="",this.screenSizeEnum=s.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",activeChannels:"activeChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,gt,12,11,"div",0),e.YNc(1,xt,3,1,"ng-template",null,1,e.W1O),e.YNc(3,Tt,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,u.mk,q.oO,g.bx,P.pW,G.d,Y.$V,u.sg,Q.gM,U.lW],pipes:[u.JJ,u.OU],styles:[""]}),n})();var k=_(2605),D=_(181),S=_(8977),y=_(2262),r=_(4176),M=_(5304),T=_(664),c=_(9133),I=_(138),V=_(266),X=_(4786),R=_(6400),oe=_(9511),B=_(6731);function Zt(n,a){if(1&n&&(e.TgZ(0,"mat-option",26),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(e.lcZ(2,2,t))}}function At(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.invoiceError)}}function Lt(n,a){if(1&n&&(e.TgZ(0,"div",27),e._UZ(1,"fa-icon",28),e.YNc(2,At,2,1,"span",29),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.invoiceError)}}let vt=(()=>{class n{constructor(t,i,o,l,d,v){this.dialogRef=t,this.data=i,this.store=o,this.decimalPipe=l,this.commonService=d,this.actions=v,this.faExclamationTriangle=x.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=s.IV,this.timeUnitEnum=s.Qk,this.timeUnits=s.LO,this.selTimeUnit=s.Qk.SECS,this.invoiceError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&"SaveNewInvoice"===t.payload.action&&(t.payload.status===s.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===s.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let i=this.expiry?this.expiry:3600;this.selTimeUnit!==s.Qk.SECS&&(i=this.commonService.convertTime(this.expiry,this.selTimeUnit,s.Qk.SECS)),this.store.dispatch((0,T.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:i,private:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=s.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,s.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}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(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(u.JJ),e.Y36(O.v),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-create-invoices"]],decls:37,vars:17,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","name","expiry","placeholder","Expiry","type","number","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayoutAlign","start center",1,"mt-2"],["tabindex","6","color","primary","matTooltip","Include routing hints for private channels","name","private",3,"ngModel","matTooltipPosition","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Create Invoice"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7,8),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"input",10),e.NdJ("ngModelChange",function(d){return i.description=d}),e.qZA(),e.qZA(),e.TgZ(13,"div",11),e.TgZ(14,"mat-form-field",12),e.TgZ(15,"input",13),e.NdJ("ngModelChange",function(d){return i.invoiceValue=d})("keyup",function(){return i.onInvoiceValueChange()}),e.qZA(),e.TgZ(16,"span",14),e._uU(17," Sats "),e.qZA(),e.TgZ(18,"mat-hint"),e._uU(19),e.qZA(),e.qZA(),e.TgZ(20,"mat-form-field",15),e.TgZ(21,"input",16),e.NdJ("ngModelChange",function(d){return i.expiry=d}),e.qZA(),e.TgZ(22,"span",14),e._uU(23),e.ALo(24,"titlecase"),e.qZA(),e.qZA(),e.TgZ(25,"mat-form-field",17),e.TgZ(26,"mat-select",18),e.NdJ("selectionChange",function(d){return i.onTimeUnitChange(d)}),e.YNc(27,Zt,3,4,"mat-option",19),e.qZA(),e.qZA(),e.qZA(),e.TgZ(28,"div",20),e.TgZ(29,"mat-slide-toggle",21),e.NdJ("ngModelChange",function(d){return i.private=d}),e._uU(30,"Private Routing Hints"),e.qZA(),e.qZA(),e.YNc(31,Lt,3,2,"div",22),e.TgZ(32,"div",23),e.TgZ(33,"button",24),e.NdJ("click",function(){return i.resetData()}),e._uU(34,"Clear Field"),e.qZA(),e.TgZ(35,"button",25),e.NdJ("click",function(){e.CHM(o);const d=e.MAs(10);return i.onAddInvoice(d)}),e._uU(36,"Create Invoice"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",i.description),e.xp6(3),e.Q6J("ngModel",i.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(i.invoiceValueHint),e.xp6(2),e.Q6J("ngModel",i.expiry)("step",i.selTimeUnit===i.timeUnitEnum.SECS?300:i.selTimeUnit===i.timeUnitEnum.MINS?10:i.selTimeUnit===i.timeUnitEnum.HOURS?2:1)("min",1),e.xp6(2),e.hij(" ",e.lcZ(24,15,i.selTimeUnit)," "),e.xp6(3),e.Q6J("value",i.selTimeUnit),e.xp6(1),e.Q6J("ngForOf",i.timeUnits),e.xp6(2),e.Q6J("ngModel",i.private)("matTooltipPosition","above"),e.xp6(2),e.Q6J("ngIf",""!==i.invoiceError))},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.JJ,c.On,c.wV,c.qQ,X.q,g.R9,g.bx,R.gD,u.sg,oe.Rr,Q.gM,u.O5,B.ey,N.BN],pipes:[u.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var bt=_(7179),L=_(4097),W=_(6718);function St(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5),e.TgZ(2,"mat-form-field",6),e.TgZ(3,"input",7),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().description=o}),e.qZA(),e.qZA(),e.TgZ(4,"mat-form-field",8),e.TgZ(5,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().invoiceValue=o})("keyup",function(){return e.CHM(t),e.oxw().onInvoiceValueChange()}),e.qZA(),e.TgZ(6,"span",10),e._uU(7," Sats "),e.qZA(),e.TgZ(8,"mat-hint"),e._uU(9),e.qZA(),e.qZA(),e.TgZ(10,"div",11),e.TgZ(11,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(12,"Clear Field"),e.qZA(),e.TgZ(13,"button",13),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(1);return e.oxw().onAddInvoice(o)}),e._uU(14,"Create Invoice"),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.description),e.xp6(2),e.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(t.invoiceValueHint)}}function wt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",14),e.TgZ(1,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDeleteExpiredInvoices()}),e._uU(2,"Delete Expired"),e.qZA(),e.TgZ(3,"button",16),e.NdJ("click",function(){return e.CHM(t),e.oxw().openCreateInvoiceModal()}),e._uU(4,"Create Invoice"),e.qZA(),e.qZA()}}function qt(n,a){1&n&&e._UZ(0,"mat-progress-bar",45)}function Ft(n,a){1&n&&(e.TgZ(0,"th",46),e._uU(1," Expiry Date "),e.qZA())}const me=function(n){return{"mr-0":n}};function Ot(n,a){if(1&n&&e._UZ(0,"span",51),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,me,t.screenSize===t.screenSizeEnum.XS))}}function Rt(n,a){if(1&n&&e._UZ(0,"span",52),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,me,t.screenSize===t.screenSizeEnum.XS))}}function Ut(n,a){if(1&n&&e._UZ(0,"span",53),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,me,t.screenSize===t.screenSizeEnum.XS))}}function Nt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.YNc(1,Ot,1,3,"span",48),e.YNc(2,Rt,1,3,"span",49),e.YNc(3,Ut,1,3,"span",50),e._uU(4),e.ALo(5,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf","paid"===t.status),e.xp6(1),e.Q6J("ngIf","unpaid"===t.status),e.xp6(1),e.Q6J("ngIf","expired"===t.status),e.xp6(1),e.hij(" ",e.xi3(5,4,1e3*t.expires_at,"dd/MMM/YYYY HH:mm")," ")}}function kt(n,a){1&n&&(e.TgZ(0,"th",46),e._uU(1," Date Settled "),e.qZA())}function It(n,a){if(1&n&&(e.TgZ(0,"td",47),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*t.paid_at,"dd/MMM/YYYY HH:mm")||"-")}}function Mt(n,a){1&n&&(e.TgZ(0,"th",46),e._uU(1," Description "),e.qZA())}const Et=function(n){return{"max-width":n}};function Dt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.TgZ(1,"div",54),e.TgZ(2,"span",55),e._uU(3),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(2,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"32rem")),e.xp6(2),e.Oqu(t.description)}}function Pt(n,a){1&n&&(e.TgZ(0,"th",56),e._uU(1," Amount (Sats) "),e.qZA())}function Jt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.TgZ(1,"span",57),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0"),"")}}function Qt(n,a){1&n&&(e.TgZ(0,"th",56),e._uU(1," Amount Settled (Sats) "),e.qZA())}function Yt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.TgZ(1,"span",57),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,t.msatoshi_received/1e3,t.msatoshi_received<1e3?"1.0-4":"1.0-0"),"")}}function Bt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",58),e.TgZ(1,"div",59),e.TgZ(2,"mat-select",60),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",61),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}const Ht=function(n){return{"px-3":n}};function Vt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",62),e.TgZ(1,"div",63),e.TgZ(2,"mat-select",64),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",61),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onInvoiceClick(l)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",61),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onRefreshInvoice(l)}),e._uU(7,"Refresh"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Ht,t.screenSize!==t.screenSizeEnum.XS))}}function zt(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No invoice available."),e.qZA())}function Gt(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting invoices..."),e.qZA())}function Xt(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function Wt(n,a){if(1&n&&(e.TgZ(0,"td",65),e.YNc(1,zt,2,0,"p",66),e.YNc(2,Gt,2,0,"p",66),e.YNc(3,Xt,2,1,"p",66),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Kt=function(n){return{"display-none":n}};function $t(n,a){if(1&n&&e._UZ(0,"tr",67),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Kt,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function jt(n,a){1&n&&e._UZ(0,"tr",68)}function en(n,a){1&n&&e._UZ(0,"tr",69)}const tn=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},nn=function(){return["no_invoice"]};function an(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",17),e.TgZ(1,"div",18),e.TgZ(2,"div",19),e._UZ(3,"fa-icon",20),e.TgZ(4,"span",21),e._uU(5,"Invoices History"),e.qZA(),e.qZA(),e.TgZ(6,"mat-form-field",22),e.TgZ(7,"input",23),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",24),e.YNc(9,qt,1,0,"mat-progress-bar",25),e.TgZ(10,"table",26,27),e.ynx(12,28),e.YNc(13,Ft,2,0,"th",29),e.YNc(14,Nt,6,7,"td",30),e.BQk(),e.ynx(15,31),e.YNc(16,kt,2,0,"th",29),e.YNc(17,It,3,4,"td",30),e.BQk(),e.ynx(18,32),e.YNc(19,Mt,2,0,"th",29),e.YNc(20,Dt,4,4,"td",30),e.BQk(),e.ynx(21,33),e.YNc(22,Pt,2,0,"th",34),e.YNc(23,Jt,4,4,"td",30),e.BQk(),e.ynx(24,35),e.YNc(25,Qt,2,0,"th",34),e.YNc(26,Yt,4,4,"td",30),e.BQk(),e.ynx(27,36),e.YNc(28,Bt,6,0,"th",37),e.YNc(29,Vt,8,3,"td",38),e.BQk(),e.ynx(30,39),e.YNc(31,Wt,4,3,"td",40),e.BQk(),e.YNc(32,$t,1,3,"tr",41),e.YNc(33,jt,1,0,"tr",42),e.YNc(34,en,1,0,"tr",43),e.qZA(),e.qZA(),e._UZ(35,"mat-paginator",44),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.invoices)("ngClass",e.VKq(12,tn,""!==t.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(14,nn)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Ae=(()=>{class n{constructor(t,i,o,l,d,v,J){this.logger=t,this.store=i,this.decimalPipe=o,this.commonService=l,this.rtlEffects=d,this.datePipe=v,this.actions=J,this.calledFrom="transactions",this.faHistory=x.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["expires_at","msatoshi","actions"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","msatoshi_received","actions"]):(this.flgSticky=!0,this.displayedColumns=["expires_at","paid_at","description","msatoshi","msatoshi_received","actions"])}ngOnInit(){this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(h.gc).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.invoiceJSONArr=t.listInvoices.invoices||[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[3]),(0,D.h)(t=>t.type===s.sW.SET_LOOKUP_CL||t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.SET_LOOKUP_CL&&this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&t.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(t.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,L.qR)({payload:{data:{pageSize:this.pageSize,component:vt}}}))}onAddInvoice(t){this.invoiceValue||(this.invoiceValue=0);const i=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch((0,T.Rd)({payload:{label:this.newlyAddedInvoiceMemo,amount:1e3*this.invoiceValue,description:this.description,expiry:i,private:this.private}})),this.resetData()}onDeleteExpiredInvoices(){this.store.dispatch((0,L.c1)({payload:{data:{type:"CONFIRM",titleMessage:"Delete Expired Invoices",noBtnText:"Cancel",yesBtnText:"Delete Invoices"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[4])).subscribe(t=>{t&&this.store.dispatch((0,T.g6)({payload:null}))})}onInvoiceClick(t){this.store.dispatch((0,L.qR)({payload:{data:{invoice:{msatoshi:t.msatoshi,label:t.label,expires_at:t.expires_at,paid_at:t.paid_at,bolt11:t.bolt11,payment_hash:t.payment_hash,description:t.description,status:t.status,msatoshi_received:t.msatoshi_received},newlyAdded:!1,component:bt.$}}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[5])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,s.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onRefreshInvoice(t){this.store.dispatch((0,T.n7)({payload:t.label}))}updateInvoicesData(t){this.invoiceJSONArr=this.invoiceJSONArr.map(i=>i.label===t.label?t:i)}loadInvoicesTable(t){this.invoices=new r.by(t?[...t]:[]),this.invoices.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(i,o)=>((i.paid_at?this.datePipe.transform(new Date(1e3*i.paid_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.expires_at?this.datePipe.transform(new Date(1e3*i.expires_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.invoices.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(u.JJ),e.Y36(O.v),e.Y36(W.V),e.Y36(u.uU),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lightning-invoices-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("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",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","name","invoiceValue","type","number","tabindex","3",3,"ngModel","step","min","ngModelChange","keyup"],["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-stroked-button","","color","warn","tabindex","7","type","button",1,"mr-1",3,"click"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","expires_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","paid_at"],["matColumnDef","description"],["matColumnDef","msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_received"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Paid","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","Paid","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"],["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"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,St,15,5,"form",1),e.YNc(2,wt,5,0,"div",2),e.YNc(3,an,36,15,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,c.JJ,c.On,c.wV,c.qQ,X.q,g.R9,g.bx,U.lW,N.BN,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,Q.gM,u.PC,q.Zl,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],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}"]}),n})();var z=_(3453),se=_(9859),le=_(904);const on=["sendPaymentForm"],sn=["paymentAmt"],ln=["offerAmt"],rn=["paymentReq"],cn=["offerReq"];function un(n,a){if(1&n&&(e.TgZ(0,"mat-radio-button",22),e._uU(1,"Offer"),e.qZA()),2&n){const t=e.oxw(2);e.s9C("value",t.paymentTypes.OFFER)}}function pn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-radio-group",18),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().paymentType=o})("change",function(){return e.CHM(t),e.oxw().onPaymentTypeChange()}),e.TgZ(1,"mat-radio-button",19),e._uU(2,"Invoice"),e.qZA(),e.TgZ(3,"mat-radio-button",20),e._uU(4,"Keysend"),e.qZA(),e.YNc(5,un,2,1,"mat-radio-button",21),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngModel",t.paymentType),e.xp6(1),e.s9C("value",t.paymentTypes.INVOICE),e.xp6(2),e.s9C("value",t.paymentTypes.KEYSEND),e.xp6(2),e.Q6J("ngIf",t.selNode.enableOffers)}}function mn(n,a){1&n&&e.GkF(0)}function dn(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentError)}}function fn(n,a){if(1&n&&(e.TgZ(0,"div",23),e._UZ(1,"fa-icon",24),e.YNc(2,dn,2,1,"span",25),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.paymentError)}}function _n(n,a){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function hn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function gn(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Cn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment amount is required."),e.qZA())}function xn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",29,30),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).paymentAmount=o})("change",function(o){return e.CHM(t),e.oxw(2).onAmountChange(o)}),e.qZA(),e.TgZ(3,"mat-hint"),e._uU(4,"It is a zero amount invoice, enter amount to be paid."),e.qZA(),e.YNc(5,Cn,2,0,"mat-error",25),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.paymentAmount),e.xp6(4),e.Q6J("ngIf",!t.paymentAmount)}}function Tn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"textarea",26,27),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(3,_n,2,1,"mat-hint",25),e.YNc(4,hn,2,0,"mat-error",25),e.YNc(5,gn,2,1,"mat-error",25),e.qZA(),e.YNc(6,xn,6,2,"mat-form-field",28)}if(2&n){const t=e.MAs(2),i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.paymentRequest),e.xp6(2),e.Q6J("ngIf",i.paymentRequest&&""!==i.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!i.paymentRequest),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),e.xp6(1),e.Q6J("ngIf",i.zeroAmtInvoice)}}function yn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Pubkey is required."),e.qZA())}function Zn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Keysend amount is required."),e.qZA())}function An(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",31),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().pubkey=o}),e.qZA(),e.YNc(2,yn,2,0,"mat-error",25),e.qZA(),e.TgZ(3,"mat-form-field",1),e.TgZ(4,"input",32,33),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().keysendAmount=o}),e.qZA(),e.YNc(6,Zn,2,0,"mat-error",25),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.pubkey),e.xp6(1),e.Q6J("ngIf",!t.pubkey),e.xp6(2),e.Q6J("ngModel",t.keysendAmount),e.xp6(2),e.Q6J("ngIf",!t.keysendAmount)}}function Ln(n,a){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.offerDecodedHint)}}function vn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Offer request is required."),e.qZA())}function bn(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.offerDecodedHint)}}function Sn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Offer amount is required."),e.qZA())}function wn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",38,39),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).offerAmount=o})("change",function(o){return e.CHM(t),e.oxw(2).onAmountChange(o)}),e.qZA(),e.TgZ(3,"mat-hint"),e._uU(4,"It is a zero amount offer, enter amount to be paid."),e.qZA(),e.YNc(5,Sn,2,0,"mat-error",25),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.offerAmount),e.xp6(4),e.Q6J("ngIf",!t.offerAmount)}}function qn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",40),e.TgZ(1,"input",41),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).offerTitle=o}),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.offerTitle)}}function Fn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"textarea",34,35),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(3,Ln,2,1,"mat-hint",25),e.YNc(4,vn,2,0,"mat-error",25),e.YNc(5,bn,2,1,"mat-error",25),e.qZA(),e.YNc(6,wn,6,2,"mat-form-field",28),e.TgZ(7,"div",1),e.TgZ(8,"mat-checkbox",36),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().flgSaveToDB=o}),e._uU(9,"Save/Update Offer"),e.qZA(),e.qZA(),e.YNc(10,qn,2,1,"mat-form-field",37)}if(2&n){const t=e.MAs(2),i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.offerRequest),e.xp6(2),e.Q6J("ngIf",i.offerRequest&&""!==i.offerDecodedHint),e.xp6(1),e.Q6J("ngIf",!i.offerRequest),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),e.xp6(1),e.Q6J("ngIf",i.zeroAmtOffer),e.xp6(2),e.Q6J("ngModel",i.flgSaveToDB)("matTooltipPosition","above"),e.xp6(2),e.Q6J("ngIf",i.flgSaveToDB||""!==i.offerTitle)}}let Le=(()=>{class n{constructor(t,i,o,l,d,v,J){this.dialogRef=t,this.data=i,this.store=o,this.logger=l,this.commonService=d,this.decimalPipe=v,this.actions=J,this.faExclamationTriangle=x.eHv,this.paymentTypes=s.IX,this.paymentType=s.IX.INVOICE,this.selNode={},this.offerDecoded={},this.offerRequest="",this.offerDecodedHint="",this.offerDescription="",this.offerVendor="",this.offerTitle="",this.zeroAmtOffer=!1,this.offerInvoice=null,this.offerAmount=null,this.offerUUID=null,this.flgSaveToDB=!1,this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentAmount=null,this.pubkey="",this.keysendAmount=null,this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=s.Vc[0],this.feeLimitTypes=s.Vc,this.paymentError="",this.isCompatibleVersion=!1,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}set payReq(t){t&&(this.paymentReq=t)}set offrReq(t){t&&(this.offerReq=t)}ngOnInit(){if(this.data&&this.data.paymentType)switch(this.paymentType=this.data.paymentType,this.paymentType){case s.IX.INVOICE:this.paymentRequest=this.data.invoiceBolt11;break;case s.IX.KEYSEND:this.pubkey=this.data.pubkeyKeysend;break;case s.IX.OFFER:this.onPaymentRequestEntry(this.data.offerBolt12),this.offerTitle=this.data.offerTitle,this.offerUUID=this.data.offerUUId,this.flgSaveToDB=!1}this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.isCompatibleVersion=this.commonService.isVersionCompatible(t.version,"0.9.0")&&this.commonService.isVersionCompatible(t.api_version,"0.4.0")}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.activeChannels=t.activeChannels,this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[3]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL||t.type===s.sW.SEND_PAYMENT_STATUS_CL||t.type===s.sW.SET_DECODED_PAYMENT_CL||t.type===s.sW.SET_OFFER_INVOICE_CL)).subscribe(t=>{t.type===s.sW.SEND_PAYMENT_STATUS_CL&&this.dialogRef.close(),t.type===s.sW.SET_DECODED_PAYMENT_CL&&(this.paymentType===s.IX.INVOICE?"bolt12 offer"===t.payload.type&&t.payload.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=t.payload,this.setPaymentDecodedDetails()):this.paymentType===s.IX.OFFER&&("bolt11 invoice"===t.payload.type&&t.payload.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=t.payload,this.setOfferDecodedDetails()))),t.type===s.sW.SET_OFFER_INVOICE_CL&&(this.offerInvoice=t.payload,this.sendPayment()),t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&("SendPayment"===t.payload.action&&(delete this.paymentDecoded.msatoshi,this.paymentError=t.payload.message),"DecodePayment"===t.payload.action&&(this.paymentType===s.IX.INVOICE&&(this.paymentDecodedHint="ERROR: "+t.payload.message,this.paymentReq.control.setErrors({decodeError:!0})),this.paymentType===s.IX.OFFER&&(this.offerDecodedHint="ERROR: "+t.payload.message,this.offerReq.control.setErrors({decodeError:!0}))),"FetchOfferInvoice"===t.payload.action&&this.paymentType===s.IX.OFFER&&(this.paymentError=t.payload.message))})}onSendPayment(){switch(this.paymentType){case s.IX.KEYSEND:if(!this.pubkey||""===this.pubkey.trim()||!this.keysendAmount||this.keysendAmount<=0)return!0;this.keysendPayment();break;case s.IX.INVOICE:if(!this.paymentRequest||this.zeroAmtInvoice&&(0===this.paymentAmount||!this.paymentAmount))return this.paymentReq.control.markAsTouched(),this.paymentAmt.control.markAsTouched(),!0;this.paymentDecoded.created_at?this.sendPayment():(this.resetInvoiceDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!0}})));break;case s.IX.OFFER:if(!this.offerRequest||this.zeroAmtOffer&&(0===this.offerAmount||!this.offerAmount))return this.offerReq.control.markAsTouched(),this.offerAmt.control.markAsTouched(),!0;this.offerDecoded.offer_id?this.sendPayment():(this.resetOfferDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.offerRequest,fromDialog:!0}})))}}keysendPayment(){this.store.dispatch((0,T.oV)({payload:{uiMessage:s.m6.SEND_KEYSEND,paymentType:s.IX.KEYSEND,pubkey:this.pubkey,amount:1e3*this.keysendAmount,fromDialog:!0}}))}sendPayment(){this.paymentType===s.IX.INVOICE?this.store.dispatch((0,T.oV)(this.zeroAmtInvoice?{payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!0}})):this.paymentType===s.IX.OFFER&&this.store.dispatch(this.offerInvoice?(0,T.oV)({payload:{uiMessage:s.m6.SEND_OFFER,paymentType:s.IX.OFFER,invoice:this.offerInvoice.invoice,saveToDB:this.flgSaveToDB,offerUUID:this.offerUUID,offerBolt12:this.offerRequest,amount:1e3*this.offerAmount,title:this.offerTitle,vendor:this.offerVendor,description:this.offerDescription,fromDialog:!0}}):(0,T.eM)(this.zeroAmtOffer?{payload:{offer:this.offerRequest,msatoshi:1e3*this.offerAmount}}:{payload:{offer:this.offerRequest}}))}onPaymentRequestEntry(t){this.paymentType===s.IX.INVOICE?(this.paymentRequest=t,this.paymentRequest&&this.paymentRequest.length>100&&(this.resetInvoiceDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!0}})))):this.paymentType===s.IX.OFFER&&(this.offerRequest=t,this.offerRequest&&this.offerRequest.length>100&&(this.resetOfferDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.offerRequest,fromDialog:!0}}))))}resetOfferDetails(){this.offerInvoice=null,this.offerAmount=null,this.offerDecodedHint="",this.zeroAmtOffer=!1,this.flgSaveToDB=!1,this.paymentError="",this.offerReq&&this.offerReq.control.setErrors(null)}resetInvoiceDetails(){this.paymentAmount=null,this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentError="",this.paymentReq&&this.paymentReq.control.setErrors(null)}onAmountChange(t){this.paymentType===s.IX.INVOICE&&(delete this.paymentDecoded.msatoshi,this.paymentDecoded.msatoshi=+t.target.value),this.paymentType===s.IX.OFFER&&(delete this.offerDecoded.amount,delete this.offerDecoded.amount_msat,this.offerDecoded.amount=1e3*+t.target.value,this.offerDecoded.amount_msat=t.target.value+"msat")}onPaymentTypeChange(){this.paymentError="",this.paymentDecodedHint="",this.offerDecodedHint="",this.offerInvoice=null}setOfferDecodedDetails(){this.offerDecoded.offer_id&&!this.offerDecoded.amount_msat?(this.offerDecoded.amount_msat="0msat",this.offerDecoded.amount=0,this.zeroAmtOffer=!0,this.offerDecodedHint="Zero Amount Offer | Description: "+this.offerDecoded.description):(this.zeroAmtOffer=!1,this.offerDecoded.amount=+(this.offerDecoded.amount||this.offerDecoded.amount_msat.slice(0,-4)),this.offerAmount=this.offerDecoded.amount?this.offerDecoded.amount/1e3:0,this.offerDescription=this.offerDecoded.description,this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.selNode.fiatConversion?this.commonService.convertCurrency(this.offerAmount,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[5])).subscribe({next:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,s.Xz.OTHER)+") | Description: "+this.offerDecoded.description},error:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description+". Unable to convert currency."}}):this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description)}setPaymentDecodedDetails(){this.paymentDecoded.created_at&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[6])).subscribe({next:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,s.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description)}resetData(){switch(this.paymentType){case s.IX.KEYSEND:this.pubkey="",this.keysendAmount=null;break;case s.IX.INVOICE:this.paymentRequest="",this.paymentDecoded={},this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=s.Vc[0],this.resetInvoiceDetails();break;case s.IX.OFFER:this.offerRequest="",this.offerDecoded={},this.resetOfferDetails()}this.paymentError=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(F.mQ),e.Y36(O.v),e.Y36(u.JJ),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lightning-send-payments"]],viewQuery:function(t,i){if(1&t&&(e.Gf(on,5),e.Gf(sn,5),e.Gf(ln,5),e.Gf(rn,5),e.Gf(cn,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.paymentAmt=o.first),e.iGM(o=e.CRH())&&(i.offerAmt=o.first),e.iGM(o=e.CRH())&&(i.payReq=o.first),e.iGM(o=e.CRH())&&(i.offrReq=o.first)}},decls:25,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","12","fxFlex","10","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","my-1","color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",3,"ngModel","ngModelChange","change",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","column",3,"submit","reset"],["sendPaymentForm","ngForm"],[4,"ngTemplateOutlet"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","9","type","reset",1,"mr-1"],["mat-button","","color","primary","type","submit","tabindex","8"],["invoiceBlock",""],["keysendBlock",""],["offerBlock",""],["color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",1,"my-1",3,"ngModel","ngModelChange","change"],["fxFlex","20","tabindex","1",3,"value"],["fxFlex","20","tabindex","2",3,"value"],["fxFlex","20","tabindex","3",3,"value",4,"ngIf"],["fxFlex","20","tabindex","3",3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"],["autoFocus","","matInput","","placeholder","Payment Request","rows","4","name","paymentRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],["fxFlex","100",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["autoFocus","","matInput","","placeholder","Pubkey","name","pubkey","tabindex","4","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Amount (Sats)","name","keysendAmount","tabindex","5","required","",3,"ngModel","ngModelChange"],["keysendAmt","ngModel"],["autoFocus","","matInput","","placeholder","Offer Request","rows","4","name","offerRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["offerReq","ngModel"],["fxFlex","30","tabindex","6","color","primary","matTooltip","Save or update offer in database for future payments",1,"mt-1",3,"ngModel","matTooltipPosition","ngModelChange"],["fxFlex","100","class","mt-1",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amountoffer","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["offerAmt","ngModel"],["fxFlex","100",1,"mt-1"],["matInput","","placeholder","Title to Save","tabindex","7",3,"ngModel","ngModelChange"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Send Payment"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.YNc(9,pn,6,4,"mat-radio-group",7),e.TgZ(10,"form",8,9),e.NdJ("submit",function(){return i.onSendPayment()})("reset",function(){return i.resetData()}),e.YNc(12,mn,1,0,"ng-container",10),e.YNc(13,fn,3,2,"div",11),e.TgZ(14,"div",12),e.TgZ(15,"button",13),e._uU(16,"Clear Fields"),e.qZA(),e.TgZ(17,"button",14),e._uU(18,"Send Payment"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(19,Tn,7,5,"ng-template",null,15,e.W1O),e.YNc(21,An,7,4,"ng-template",null,16,e.W1O),e.YNc(23,Fn,11,8,"ng-template",null,17,e.W1O)),2&t){const o=e.MAs(20),l=e.MAs(22),d=e.MAs(24);e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(3),e.Q6J("ngIf",i.isCompatibleVersion),e.xp6(3),e.Q6J("ngTemplateOutlet",i.paymentType===i.paymentTypes.KEYSEND?l:i.paymentType===i.paymentTypes.OFFER?d:o),e.xp6(1),e.Q6J("ngIf",""!==i.paymentError)}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,u.O5,c._Y,c.JL,c.F,u.tP,se.VQ,c.JJ,c.On,se.U0,N.BN,g.KE,I.Nt,c.Fj,V.h,c.Q7,g.bx,g.TO,le.oG,Q.gM],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}"]}),n})();var re=_(5864);const On=["sendPaymentForm"];function Rn(n,a){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Un(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function Nn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5),e.TgZ(2,"mat-form-field",6),e.TgZ(3,"textarea",7,8),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(5,Rn,2,1,"mat-hint",9),e.YNc(6,Un,2,0,"mat-error",9),e.qZA(),e.TgZ(7,"div",10),e.TgZ(8,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(9,"Clear Field"),e.qZA(),e.TgZ(10,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendPayment()}),e._uU(11,"Send Payment"),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.paymentRequest),e.xp6(2),e.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!t.paymentRequest)}}function kn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",13),e.TgZ(1,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().openSendPaymentModal()}),e._uU(2,"Send Payment"),e.qZA(),e.qZA()}}function In(n,a){1&n&&e._UZ(0,"mat-progress-bar",47)}function Mn(n,a){1&n&&(e.TgZ(0,"th",48),e._uU(1,"Created At"),e.qZA())}const $=function(n){return{"mr-0":n}};function En(n,a){if(1&n&&e._UZ(0,"span",52),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function Dn(n,a){if(1&n&&e._UZ(0,"span",53),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function Pn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.YNc(1,En,1,3,"span",50),e.YNc(2,Dn,1,3,"span",51),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf","complete"===t.status),e.xp6(1),e.Q6J("ngIf","complete"!==t.status),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*(null==t?null:t.created_at),"dd/MMM/YYYY HH:mm")," ")}}function Jn(n,a){1&n&&(e.TgZ(0,"th",48),e._uU(1,"Payment Hash"),e.qZA())}function Qn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(null==t?null:t.payment_hash)}}function Yn(n,a){1&n&&(e.TgZ(0,"th",54),e._uU(1,"Sats Sent"),e.qZA())}function Bn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",55),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0"))}}function Hn(n,a){1&n&&(e.TgZ(0,"th",54),e._uU(1,"Sats Received"),e.qZA())}function Vn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",55),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"))}}function zn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",56),e.TgZ(1,"div",57),e.TgZ(2,"mat-select",58),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",59),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Gn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",60),e.TgZ(1,"button",61),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onPaymentClick(l)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function Xn(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No payment available."),e.qZA())}function Wn(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting payments..."),e.qZA())}function Kn(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function $n(n,a){if(1&n&&(e.TgZ(0,"td",62),e.YNc(1,Xn,2,0,"p",9),e.YNc(2,Wn,2,0,"p",9),e.YNc(3,Kn,2,1,"p",9),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function jn(n,a){if(1&n&&e._UZ(0,"span",66),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ei(n,a){if(1&n&&e._UZ(0,"span",67),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ti(n,a){if(1&n&&e._UZ(0,"span",66),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ni(n,a){if(1&n&&e._UZ(0,"span",67),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ii(n,a){if(1&n&&(e.TgZ(0,"span",69),e.YNc(1,ti,1,3,"span",64),e.YNc(2,ni,1,3,"span",65),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf","complete"===t.status),e.xp6(1),e.Q6J("ngIf","complete"!==t.status),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*t.created_at,"dd/MMM/YYYY HH:mm")," ")}}function ai(n,a){if(1&n&&(e.ynx(0),e.YNc(1,ii,5,6,"span",68),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function oi(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",63),e.YNc(2,jn,1,3,"span",64),e.YNc(3,ei,1,3,"span",65),e._uU(4),e.qZA(),e.YNc(5,ai,2,1,"ng-container",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Q6J("ngIf","complete"===t.status),e.xp6(1),e.Q6J("ngIf","complete"!==t.status),e.xp6(1),e.hij(" Total Attempts: ",null==t?null:t.total_parts," "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function si(n,a){if(1&n&&(e.TgZ(0,"span",63),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" Part ID ",t.partid?t.partid:0," ")}}function li(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,si,2,1,"span",70),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function ri(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",63),e._uU(2),e.qZA(),e.YNc(3,li,2,1,"span",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(null==t?null:t.payment_hash),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function ci(n,a){if(1&n&&(e.TgZ(0,"span",71),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.msatoshi_sent/1e3,t.msatoshi_sent<1e3?"1.0-4":"1.0-0")," ")}}function ui(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,ci,3,4,"span",72),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function pi(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",71),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,ui,2,1,"span",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0")),e.xp6(2),e.Q6J("ngIf",t.is_expanded)}}function mi(n,a){if(1&n&&(e.TgZ(0,"span",71),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0")," ")}}function di(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,mi,3,4,"span",72),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function fi(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",71),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,di,2,1,"span",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0")),e.xp6(2),e.Q6J("ngIf",t.is_expanded)}}function _i(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",55),e.TgZ(1,"button",76),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(4).onPaymentClick(l)}),e._uU(2),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit;e.xp6(2),e.hij("View ",t.partid?t.partid:0,"")}}function hi(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,_i,3,1,"div",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function gi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",73),e.TgZ(1,"span",55),e.TgZ(2,"button",74),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return l.is_expanded=!l.is_expanded}),e._uU(3),e.qZA(),e.qZA(),e.YNc(4,hi,2,1,"div",9),e.qZA()}if(2&n){const t=a.$implicit;e.xp6(3),e.Oqu(t.is_expanded?"Hide":"Show"),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Ci(n,a){1&n&&e._UZ(0,"tr",77)}const xi=function(n){return{"display-none":n}};function Ti(n,a){if(1&n&&e._UZ(0,"tr",78),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,xi,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function yi(n,a){1&n&&e._UZ(0,"tr",79)}function Zi(n,a){1&n&&e._UZ(0,"tr",77)}const Ai=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Li=function(){return["no_payment"]};function vi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",14),e.TgZ(1,"div",15),e.TgZ(2,"div",16),e._UZ(3,"fa-icon",17),e.TgZ(4,"span",18),e._uU(5,"Payments History"),e.qZA(),e.qZA(),e.TgZ(6,"mat-form-field",19),e.TgZ(7,"input",20),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",21),e.YNc(9,In,1,0,"mat-progress-bar",22),e.TgZ(10,"table",23,24),e.ynx(12,25),e.YNc(13,Mn,2,0,"th",26),e.YNc(14,Pn,5,6,"td",27),e.BQk(),e.ynx(15,28),e.YNc(16,Jn,2,0,"th",26),e.YNc(17,Qn,3,1,"td",27),e.BQk(),e.ynx(18,29),e.YNc(19,Yn,2,0,"th",30),e.YNc(20,Bn,4,4,"td",27),e.BQk(),e.ynx(21,31),e.YNc(22,Hn,2,0,"th",30),e.YNc(23,Vn,4,4,"td",27),e.BQk(),e.ynx(24,32),e.YNc(25,zn,6,0,"th",33),e.YNc(26,Gn,3,0,"td",34),e.BQk(),e.ynx(27,35),e.YNc(28,$n,4,3,"td",36),e.BQk(),e.ynx(29,37),e.YNc(30,oi,6,4,"td",27),e.BQk(),e.ynx(31,38),e.YNc(32,ri,4,2,"td",27),e.BQk(),e.ynx(33,39),e.YNc(34,pi,5,5,"td",27),e.BQk(),e.ynx(35,40),e.YNc(36,fi,5,5,"td",27),e.BQk(),e.ynx(37,41),e.YNc(38,gi,5,2,"td",42),e.BQk(),e.YNc(39,Ci,1,0,"tr",43),e.YNc(40,Ti,1,3,"tr",44),e.YNc(41,yi,1,0,"tr",45),e.YNc(42,Zi,1,0,"tr",43),e.qZA(),e.qZA(),e._UZ(43,"mat-paginator",46),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.payments)("ngClass",e.VKq(15,Ai,""!==t.errorMessage)),e.xp6(29),e.Q6J("matRowDefColumns",t.mppColumns)("matRowDefWhen",t.is_group),e.xp6(1),e.Q6J("matFooterRowDef",e.DdM(17,Li)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)("matRowDefWhen",!t.is_group),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let ve=(()=>{class n{constructor(t,i,o,l,d,v,J,A){this.logger=t,this.commonService=i,this.store=o,this.rtlEffects=l,this.clEffects=d,this.decimalPipe=v,this.titleCasePipe=J,this.datePipe=A,this.calledFrom="transactions",this.faHistory=x.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.displayedColumns=[],this.mppColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["created_at","actions"],this.mppColumns=["groupTotal","groupAction"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtRecv","groupAction"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtSent","groupAmtRecv","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["created_at","payment_hash","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupHash","groupAmtSent","groupAmtRecv","groupAction"])}ngOnInit(){this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(h.PP).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paymentJSONArr=t.payments||[],this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr)}is_group(t,i){return i.is_group}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.created_at?this.sendPayment():(this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!1}})),this.clEffects.setDecodedPaymentCL.pipe((0,z.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at?(this.paymentDecoded.msatoshi||(this.paymentDecoded.msatoshi=0),this.sendPayment()):this.resetData()}))}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.msatoshi&&0!==this.paymentDecoded.msatoshi?(this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:50,type:s.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.msatoshi/1e3,title:"Amount (Sats)",width:50,type:s.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:s.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,z.q)(1)).subscribe(i=>{i&&(this.store.dispatch((0,T.oV)({payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:40,type:s.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:s.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,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:s.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,z.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.msatoshi=o[0].inputValue,this.store.dispatch((0,T.oV)({payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*o[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&(this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!1}})),this.clEffects.setDecodedPaymentCL.subscribe(i=>{this.paymentDecoded=i,this.paymentDecoded.msatoshi?this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,s.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description}))}openSendPaymentModal(){this.store.dispatch((0,L.qR)({payload:{data:{component:Le}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}onPaymentClick(t){const i=[[{key:"bolt11",value:t.bolt11,title:"Bolt 11",width:100,type:s.Gi.STRING}],[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:s.Gi.STRING}],[{key:"id",value:t.id,title:"ID",width:20,type:s.Gi.STRING},{key:"destination",value:t.destination,title:"Destination",width:80,type:s.Gi.STRING}],[{key:"created_at",value:t.created_at,title:"Creation Date",width:50,type:s.Gi.DATE_TIME},{key:"status",value:this.titleCasePipe.transform(t.status),title:"Status",width:50,type:s.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"Amount (mSats)",width:50,type:s.Gi.NUMBER},{key:"msatoshi_sent",value:t.msatoshi_sent,title:"Amount Sent (mSats)",width:50,type:s.Gi.NUMBER}]];t.memo&&""!==t.memo&&i.splice(2,0,[{key:"memo",value:t.memo,title:"Memo",width:100,type:s.Gi.STRING}]),t.hasOwnProperty("partid")?i.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:80,type:s.Gi.STRING},{key:"partid",value:t.partid,title:"Part ID",width:20,type:s.Gi.STRING}]):i.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:s.Gi.STRING}]),this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Payment Information",message:i}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}loadPaymentsTable(t){this.payments=new r.by(t?[...t]:[]),this.payments.data=this.paymentJSONArr,this.payments.sort=this.sort,this.payments.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.payments.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.payments.filterPredicate=(i,o)=>((i.created_at?this.datePipe.transform(new Date(1e3*i.created_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.payments.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const i=JSON.parse(JSON.stringify(this.payments.data)).reduce((o,l)=>l.mpps?o.concat(l.mpps):(delete l.is_group,delete l.is_expanded,delete l.total_parts,o.concat(l)),[]);this.commonService.downloadFile(i,"Payments")}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(W.V),e.Y36(re.s),e.Y36(u.JJ),e.Y36(u.rS),e.Y36(u.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lightning-payments"]],viewQuery:function(t,i){if(1&t&&(e.Gf(On,5),e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","created_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","payment_hash"],["matColumnDef","msatoshi_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["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","groupHash"],["matColumnDef","groupAmtSent"],["matColumnDef","groupAmtRecv"],["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"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["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,"mpp-row-span"],["class","dot green mt-0","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow mt-0","matTooltip","Incomplete/Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green","mt-0",3,"ngClass"],["matTooltip","Incomplete/Failed","matTooltipPosition","right",1,"dot","yellow","mt-0",3,"ngClass"],["fxLayoutAlign","start center","class","mpp-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"mpp-row-span","pl-3"],["fxLayoutAlign","start center","class","mpp-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"mpp-row-span"],["fxLayoutAlign","end center","class","mpp-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-mpp-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-mpp-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Nn,12,3,"form",1),e.YNc(2,kn,3,0,"div",2),e.YNc(3,vi,44,18,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,c.Q7,Y.$V,c.JJ,c.On,U.lW,g.bx,g.TO,N.BN,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.nj,r.Ke,r.as,S.NW,P.pW,r.ge,y.nU,r.ev,Q.gM,R.gD,R.$L,B.ey,r.yh,u.sg,r.Gk,r.Q2,r.XQ],pipes:[u.uU,u.JJ],styles:[".mat-column-bolt11[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.mpp-row-span[_ngcontent-%COMP%]{min-height:4.2rem}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"]}),n})();function bi(n,a){if(1&n&&(e.TgZ(0,"button",26),e.TgZ(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA(),e.qZA()),2&n){e.oxw();const t=e.MAs(11);e.Q6J("matMenuTriggerFor",t)}}function Si(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).onNavigateTo("/cl/reports")}),e._uU(1,"Fees Summary"),e.qZA()}}function wi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).onsortChannelsBy()}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw(3);e.xp6(1),e.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}function qi(n,a){1&n&&e._UZ(0,"mat-progress-bar",27)}function Fi(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",28),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Oi(n,a){if(1&n&&e._UZ(0,"rtl-cl-balances-info",29),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function Ri(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-capacity-info",30),2&n){const t=e.oxw(3);e.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("activeChannels",t.activeChannelsCapacity)("errorMessage",t.errorMessages[4]+" "+t.errorMessages[3])}}function Ui(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-info",31),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[4]+" "+t.errorMessages[5])}}function Ni(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-status-info",32),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[3])}}function ki(n,a){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const be=function(n){return{"dashboard-card-content":!0,"error-border":n}};function Ii(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-grid-tile",8),e.TgZ(1,"mat-card",9),e.TgZ(2,"mat-card-header"),e.TgZ(3,"mat-card-title",10),e.TgZ(4,"div"),e._UZ(5,"fa-icon",11),e.TgZ(6,"span"),e._uU(7),e.qZA(),e.qZA(),e.TgZ(8,"div"),e.YNc(9,bi,3,1,"button",12),e.TgZ(10,"mat-menu",13,14),e.TgZ(12,"button",15),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onNavigateTo(l.link)}),e._uU(13),e.qZA(),e.YNc(14,Si,2,0,"button",16),e.YNc(15,wi,2,1,"button",16),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(16,"mat-card-content",17),e.YNc(17,qi,1,0,"mat-progress-bar",18),e.TgZ(18,"div",19),e.YNc(19,Fi,1,2,"rtl-cl-node-info",20),e.YNc(20,Oi,1,2,"rtl-cl-balances-info",21),e.YNc(21,Ri,1,4,"rtl-cl-channel-capacity-info",22),e.YNc(22,Ui,1,2,"rtl-cl-fee-info",23),e.YNc(23,Ni,1,2,"rtl-cl-channel-status-info",24),e.YNc(24,ki,2,0,"h3",25),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(5),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.link),e.xp6(4),e.hij("Go To ",t.goTo,""),e.xp6(1),e.Q6J("ngIf","fee"===t.id),e.xp6(1),e.Q6J("ngIf","capacity"===t.id),e.xp6(1),e.s9C("fxFlex","capacity"===t.id?90:70),e.Q6J("ngClass",e.VKq(17,be,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"capacity"===t.id&&(i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.ERROR)||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR))),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"capacity"===t.id&&(i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.INITIATED)||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","capacity"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","status")}}function Mi(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e._UZ(2,"fa-icon",4),e.TgZ(3,"span",5),e._uU(4),e.qZA(),e.qZA(),e.TgZ(5,"mat-grid-list",6),e.YNc(6,Ii,25,19,"mat-grid-tile",7),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("icon",t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.ERROR?t.faFrown:t.faSmile),e.xp6(2),e.Oqu(t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.COMPLETED?"Welcome "+t.information.alias+"! Your node is up and running.":t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),e.xp6(1),e.Q6J("rowHeight",t.operatorCardHeight),e.xp6(1),e.Q6J("ngForOf",t.operatorCards)}}function Ei(n,a){if(1&n&&(e.TgZ(0,"button",26),e.TgZ(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA(),e.qZA()),2&n){e.oxw();const t=e.MAs(9);e.Q6J("matMenuTriggerFor",t)}}function Di(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-card-header"),e.TgZ(1,"mat-card-title",10),e.TgZ(2,"div"),e._UZ(3,"fa-icon",11),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"div"),e.YNc(7,Ei,3,1,"button",12),e.TgZ(8,"mat-menu",13,41),e.TgZ(10,"button",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw(2).onNavigateTo(o.link)}),e._uU(11),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw().$implicit;e.xp6(3),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.link),e.xp6(4),e.hij("Go To ",t.goTo,"")}}function Pi(n,a){1&n&&e._UZ(0,"mat-progress-bar",27)}function Ji(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",42),2&n){const t=e.oxw(3);e.Q6J("information",t.information)}}function Qi(n,a){if(1&n&&e._UZ(0,"rtl-cl-balances-info",29),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function Yi(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-liquidity-info",43),2&n){const t=e.oxw(3);e.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("activeChannels",t.allInboundChannels)("errorMessage",t.errorMessages[4])}}function Bi(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-liquidity-info",43),2&n){const t=e.oxw(3);e.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("activeChannels",t.allOutboundChannels)("errorMessage",t.errorMessages[4])}}function Hi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",52),e.TgZ(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA(),e.qZA(),e.TgZ(3,"mat-menu",13,53),e.TgZ(5,"button",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).$implicit;return e.oxw(2).onNavigateTo(o.link)}),e._uU(6),e.qZA(),e.TgZ(7,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw(4).onNavigateTo("/cl/reports/transactions")}),e._uU(8,"Transactions Summary"),e.qZA(),e.qZA()}if(2&n){const t=e.MAs(4),i=e.oxw(2).$implicit;e.Q6J("matMenuTriggerFor",t),e.xp6(6),e.hij("Go To ",i.goTo,"")}}function Vi(n,a){1&n&&(e.TgZ(0,"span",44),e.TgZ(1,"mat-tab-group",45),e.TgZ(2,"mat-tab",46),e._UZ(3,"rtl-cl-lightning-invoices-table",47),e.qZA(),e.TgZ(4,"mat-tab",48),e._UZ(5,"rtl-cl-lightning-payments",49),e.qZA(),e.TgZ(6,"mat-tab",50),e.YNc(7,Hi,9,2,"ng-template",51),e.qZA(),e.qZA(),e.qZA()),2&n&&(e.xp6(3),e.Q6J("calledFrom","home"),e.xp6(2),e.Q6J("calledFrom","home"),e.xp6(1),e.Q6J("disabled",!0))}function zi(n,a){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const Gi=function(n){return{"p-0":n}};function Xi(n,a){if(1&n&&(e.TgZ(0,"mat-grid-tile",8),e.TgZ(1,"mat-card",35),e.YNc(2,Di,12,4,"mat-card-header",36),e.TgZ(3,"mat-card-content",37),e.YNc(4,Pi,1,0,"mat-progress-bar",18),e.TgZ(5,"div",19),e.YNc(6,Ji,1,1,"rtl-cl-node-info",38),e.YNc(7,Qi,1,2,"rtl-cl-balances-info",21),e.YNc(8,Yi,1,4,"rtl-cl-channel-liquidity-info",39),e.YNc(9,Bi,1,4,"rtl-cl-channel-liquidity-info",39),e.YNc(10,Vi,8,3,"span",40),e.YNc(11,zi,2,0,"h3",25),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(1),e.Q6J("ngClass",e.VKq(13,Gi,"transactions"===t.id)),e.xp6(1),e.Q6J("ngIf","transactions"!==t.id),e.xp6(1),e.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),e.Q6J("ngClass",e.VKq(15,be,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","inboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","outboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","transactions")}}function Wi(n,a){if(1&n&&(e.TgZ(0,"div",33),e._UZ(1,"fa-icon",4),e.TgZ(2,"span",5),e._uU(3),e.qZA(),e.qZA(),e.TgZ(4,"mat-grid-list",34),e.YNc(5,Xi,12,17,"mat-grid-tile",7),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faSmile),e.xp6(2),e.hij("Welcome ",t.information.alias,"! Your node is up and running."),e.xp6(1),e.Q6J("rowHeight",t.merchantCardHeight),e.xp6(1),e.Q6J("ngForOf",t.merchantCards)}}let Ki=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.store=i,this.actions=o,this.commonService=l,this.router=d,this.faSmile=Ce.I3,this.faFrown=Ce.Kf,this.faAngleDoubleDown=x.Sbq,this.faAngleDoubleUp=x.Vfw,this.faChartPie=x.OS1,this.faBolt=x.BDt,this.faServer=x.xf3,this.faNetworkWired=x.kXW,this.userPersonaEnum=s.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.totalBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.activeChannels=[],this.channelsStatus={active:{},pending:{},inactive:{}},this.activeChannelsCapacity=[],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.errorMessages=["","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusFees=null,this.apiCallStatusBalance=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFHistory=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:6,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:3,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCardHeight=.77*window.screen.height/2+"px",this.merchantCardHeight=.76*window.screen.height/10+"px",this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:2,rows:5}])}ngOnInit(){this.store.select(h.Hz).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.errorMessages[5]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusFHistory=t.apisCallStatus[1],this.apiCallStatusNodeInfo.status===s.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.apiCallStatusFHistory.status===s.Bn.ERROR&&(this.errorMessages[5]="object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(h.JG).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===s.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===s.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.activeChannels=t.activeChannels,this.activeChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels,"balancedness")))||[],this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(i=>i.msatoshi_to_them>0),"msatoshi_to_them")))||[],this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(i=>i.msatoshi_to_us>0),"msatoshi_to_us")))||[],this.activeChannels.forEach(i=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(i.msatoshi_to_them/1e3),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(i.msatoshi_to_us/1e3)}),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.logger.info(t)}),this.store.select(h.Rn).pipe((0,f.R)(this.unSubs[3]),(0,ie.M)(this.store.select(h.Wj))).subscribe(([t,i])=>{this.errorMessages[2]="",this.apiCallStatusBalance=t.apiCallStatus,this.apiCallStatusBalance.status===s.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusBalance.message?JSON.stringify(this.apiCallStatusBalance.message):this.apiCallStatusBalance.message),this.errorMessages[3]="",this.apiCallStatusLRBal=i.apiCallStatus,this.apiCallStatusLRBal.status===s.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message),this.totalBalance=t.balance,this.balances.onchain=t.balance.totalBalance,this.balances.lightning=i.localRemoteBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const o=i.localRemoteBalance.localBalance?+i.localRemoteBalance.localBalance:0,l=i.localRemoteBalance.remoteBalance?+i.localRemoteBalance.remoteBalance:0;this.channelBalances={localBalance:o,remoteBalance:l,balancedness:+(1-Math.abs((o-l)/(o+l))).toFixed(3)},this.channelsStatus.active.capacity=i.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=i.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=i.localRemoteBalance.inactiveBalance||0,this.logger.info(t),this.logger.info(i)})}onNavigateTo(t){this.router.navigateByUrl(t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.activeChannelsCapacity=this.activeChannels.sort((t,i)=>{const o=+t.msatoshi_to_us+ +t.msatoshi_to_them,l=+i.msatoshi_to_them+ +i.msatoshi_to_them;return o>l?-1:o{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(H.eX),e.Y36(O.v),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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",3,"fxFlex","ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"balances","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","activeChannels","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"balances","errorMessage"],["fxFlex","100",3,"sortBy","channelBalances","activeChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["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",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage"],["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,i){if(1&t&&(e.YNc(0,Mi,7,4,"div",0),e.YNc(1,Wi,6,4,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,N.BN,ae.Il,u.sg,ae.DX,Z.a8,p.yH,Z.dk,Z.n5,ue.VK,ue.OP,Z.dn,u.mk,q.oO,u.RF,u.n9,u.ED,U.lW,ue.p6,pe.Hw,P.pW,Te,je,ot,ye,Ze,yt,k.SP,k.uX,Ae,ve,k.uD],styles:[""]}),n})();var $i=_(2331),ji=_(5533),Se=_(4084),j=_(9966),ee=_(3050),K=_(4290);const ea=["form"],ta=["formSweepAll"],na=["stepper"];function ia(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function aa(n,a){1&n&&(e.TgZ(0,"mat-hint"),e._uU(1,"Amount replaced by UTXO balance"),e.qZA())}function oa(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.amountError)}}function sa(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function la(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function ra(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function ca(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",39),e.TgZ(1,"input",40,41),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).customFeeRate=o}),e.qZA(),e.YNc(3,ra,2,0,"mat-error",14),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),e.xp6(2),e.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function ua(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function pa(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",e.lcZ(2,2,t.value)," Sats")}}function ma(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",23),e.TgZ(1,"mat-expansion-panel",42),e.NdJ("closed",function(){return e.CHM(t),e.oxw(2).onAdvancedPanelToggle(!0)})("opened",function(){return e.CHM(t),e.oxw(2).onAdvancedPanelToggle(!1)}),e.TgZ(2,"mat-expansion-panel-header"),e.TgZ(3,"mat-panel-title"),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"div",22),e.TgZ(7,"div",43),e.TgZ(8,"mat-form-field",44),e.TgZ(9,"mat-select",45),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw(2).onUTXOSelectionChange(o)})("valueChange",function(o){return e.CHM(t),e.oxw(2).selUTXOs=o}),e.TgZ(10,"mat-select-trigger"),e._uU(11),e.ALo(12,"number"),e.qZA(),e.YNc(13,pa,3,4,"mat-option",21),e.qZA(),e.qZA(),e.TgZ(14,"mat-slide-toggle",46),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).flgUseAllBalance=o})("change",function(){return e.CHM(t),e.oxw(2).onUTXOAllBalanceChange()}),e._uU(15," Use selected UTXOs balance "),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(5),e.Oqu(t.advancedTitle),e.xp6(4),e.Q6J("value",t.selUTXOs),e.xp6(2),e.AsE("",e.lcZ(12,7,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),e.xp6(2),e.Q6J("ngForOf",t.utxos),e.xp6(1),e.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function da(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function fa(n,a){if(1&n&&(e.TgZ(0,"div",47),e._UZ(1,"fa-icon",48),e.YNc(2,da,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}const we=function(n,a){return{"mr-6":n,"mr-2":a}};function _a(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"form",9,10),e.NdJ("submit",function(){return e.CHM(t),e.oxw().onSendFunds()})("reset",function(){return e.CHM(t),e.oxw().resetData()}),e.TgZ(2,"mat-form-field",11),e.TgZ(3,"input",12,13),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transaction.address=o}),e.qZA(),e.YNc(5,ia,2,0,"mat-error",14),e.qZA(),e.TgZ(6,"mat-form-field",15),e.TgZ(7,"input",16,17),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transaction.satoshis=o}),e.qZA(),e.YNc(9,aa,2,0,"mat-hint",14),e.TgZ(10,"span",18),e._uU(11),e.qZA(),e.YNc(12,oa,2,1,"mat-error",14),e.qZA(),e.TgZ(13,"mat-form-field",19),e.TgZ(14,"mat-select",20),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().onAmountUnitChange(o)}),e.YNc(15,sa,2,2,"mat-option",21),e.qZA(),e.qZA(),e.TgZ(16,"div",22),e.TgZ(17,"div",23),e.TgZ(18,"div",24),e.TgZ(19,"mat-form-field",25),e.TgZ(20,"mat-select",26),e.NdJ("valueChange",function(o){return e.CHM(t),e.oxw().selFeeRate=o})("selectionChange",function(){return e.CHM(t),e.oxw().customFeeRate=null}),e.YNc(21,la,2,2,"mat-option",21),e.qZA(),e.qZA(),e.YNc(22,ca,4,5,"mat-form-field",27),e.qZA(),e.TgZ(23,"div",28),e.TgZ(24,"mat-checkbox",29),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().flgMinConf=o})("change",function(){e.CHM(t);const o=e.oxw();return o.flgMinConf?o.selFeeRate=null:o.minConfValue=null}),e.qZA(),e.TgZ(25,"mat-form-field",30),e.TgZ(26,"input",31,32),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().minConfValue=o}),e.qZA(),e.YNc(28,ua,2,0,"mat-error",14),e.qZA(),e.qZA(),e.qZA(),e.YNc(29,ma,16,9,"div",33),e._UZ(30,"div",22),e.YNc(31,fa,3,2,"div",34),e.TgZ(32,"div",35),e.TgZ(33,"button",36),e._uU(34,"Clear Fields"),e.qZA(),e.TgZ(35,"button",37),e._uU(36,"Send Funds"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.transaction.address),e.xp6(2),e.Q6J("ngIf",!t.transaction.address),e.xp6(2),e.Q6J("ngModel",t.transaction.satoshis)("type",t.flgUseAllBalance?"text":"number")("step",100)("min",0)("disabled",t.flgUseAllBalance),e.xp6(2),e.Q6J("ngIf",t.flgUseAllBalance),e.xp6(2),e.hij(" ",t.selAmountUnit," "),e.xp6(1),e.Q6J("ngIf",!t.transaction.satoshis),e.xp6(2),e.Q6J("value",t.selAmountUnit)("disabled",t.flgUseAllBalance),e.xp6(1),e.Q6J("ngForOf",t.amountUnits),e.xp6(4),e.Q6J("fxFlex","customperkb"!==t.selFeeRate||t.flgMinConf?"100":"48"),e.xp6(1),e.Q6J("value",t.selFeeRate)("disabled",t.flgMinConf),e.xp6(1),e.Q6J("ngForOf",t.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf),e.xp6(2),e.Q6J("ngModel",t.flgMinConf)("ngClass",e.WLB(28,we,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(2),e.Q6J("ngModel",t.minConfValue)("step",1)("min",0)("required",t.flgMinConf)("disabled",!t.flgMinConf),e.xp6(2),e.Q6J("ngIf",t.flgMinConf&&!t.minConfValue),e.xp6(1),e.Q6J("ngIf",t.isCompatibleVersion),e.xp6(2),e.Q6J("ngIf",""!==t.sendFundError)}}function ha(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw(3);e.Oqu(t.passwordFormLabel)}}function ga(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password is required."),e.qZA())}function Ca(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-step",53),e.TgZ(1,"form",71),e.YNc(2,ha,1,1,"ng-template",65),e.TgZ(3,"div",0),e.TgZ(4,"mat-form-field",1),e._UZ(5,"input",72),e.YNc(6,ga,2,0,"mat-error",14),e.qZA(),e.qZA(),e.TgZ(7,"div",73),e.TgZ(8,"button",74),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onAuthenticate()}),e._uU(9,"Confirm"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("stepControl",t.passwordFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.passwordFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function xa(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.sendFundFormLabel)}}function Ta(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function ya(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function Za(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function Aa(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",39),e._UZ(1,"input",75),e.YNc(2,Za,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("step",.1)("min",0),e.xp6(1),e.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.customFeeRate.value)}}function La(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function va(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.confirmFormLabel)}}function ba(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function Sa(n,a){if(1&n&&(e.TgZ(0,"div",47),e._UZ(1,"fa-icon",48),e.YNc(2,ba,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}function wa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",49),e.TgZ(1,"mat-vertical-stepper",50,51),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().stepSelectionChanged(o)}),e.YNc(3,Ca,10,4,"mat-step",52),e.TgZ(4,"mat-step",53),e.TgZ(5,"form",54),e.YNc(6,xa,1,1,"ng-template",55),e.TgZ(7,"div",22),e.TgZ(8,"mat-form-field",1),e._UZ(9,"input",56),e.YNc(10,Ta,2,0,"mat-error",14),e.qZA(),e.TgZ(11,"div",57),e.TgZ(12,"div",24),e.TgZ(13,"mat-form-field",25),e.TgZ(14,"mat-select",58),e.YNc(15,ya,2,2,"mat-option",21),e.qZA(),e.qZA(),e.YNc(16,Aa,3,3,"mat-form-field",27),e.qZA(),e.TgZ(17,"div",28),e._UZ(18,"mat-checkbox",59),e.TgZ(19,"mat-form-field",30),e._UZ(20,"input",60),e.YNc(21,La,2,0,"mat-error",14),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"div",61),e.TgZ(23,"button",62),e._uU(24,"Next"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(25,"mat-step",63),e.TgZ(26,"form",64),e.YNc(27,va,1,1,"ng-template",65),e.TgZ(28,"div",49),e.TgZ(29,"div",66),e._UZ(30,"fa-icon",67),e.TgZ(31,"span"),e._uU(32,"You are about to sweep all funds from RTL. Are you sure?"),e.qZA(),e.qZA(),e.YNc(33,Sa,3,2,"div",34),e.TgZ(34,"div",61),e.TgZ(35,"button",68),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendFunds()}),e._uU(36,"Sweep All Funds"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(37,"div",69),e.TgZ(38,"button",70),e._uU(39),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("linear",!0),e.xp6(2),e.Q6J("ngIf",!t.appConfig.sso.rtlSSO),e.xp6(1),e.Q6J("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.sendFundFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),e.xp6(3),e.Q6J("fxFlex","customperkb"!==t.sendFundFormGroup.controls.selFeeRate.value||t.sendFundFormGroup.controls.flgMinConf.value?"100":"48"),e.xp6(2),e.Q6J("ngForOf",t.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value),e.xp6(2),e.Q6J("ngClass",e.WLB(20,we,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(2),e.Q6J("step",1)("min",0)("required",t.sendFundFormGroup.controls.flgMinConf.value),e.xp6(1),e.Q6J("ngIf",t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.minConfValue.value),e.xp6(4),e.Q6J("stepControl",t.confirmFormGroup),e.xp6(1),e.Q6J("formGroup",t.confirmFormGroup),e.xp6(4),e.Q6J("icon",t.faExclamationTriangle),e.xp6(3),e.Q6J("ngIf",""!==t.sendFundError),e.xp6(5),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(t.flgValidated?"Close":"Cancel")}}let qe=(()=>{class n{constructor(t,i,o,l,d,v,J,A,E,_d){this.dialogRef=t,this.data=i,this.logger=o,this.store=l,this.commonService=d,this.decimalPipe=v,this.actions=J,this.formBuilder=A,this.rtlEffects=E,this.snackBar=_d,this.faExclamationTriangle=x.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=null,this.selectedAddress=s._t[1],this.blockchainBalance={},this.information={},this.isCompatibleVersion=!1,this.newAddress="",this.transaction={},this.feeRateTypes=s.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.sendFundError="",this.fiatConversion=!1,this.amountUnits=s.uA,this.selAmountUnit=s.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=s.Xz,this.advancedTitle="Advanced Options",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.amountError="Amount is Required.",this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[c.kI.required]],password:["",[c.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",c.kI.required],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.flgMinConf.valueChanges.pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{t?(this.sendFundFormGroup.controls.selFeeRate.disable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.reset(),this.sendFundFormGroup.controls.minConfValue.enable(),this.sendFundFormGroup.controls.minConfValue.setValidators([c.kI.required]),this.sendFundFormGroup.controls.minConfValue.setValue(null)):(this.sendFundFormGroup.controls.selFeeRate.enable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.setValue(null),this.sendFundFormGroup.controls.minConfValue.disable(),this.sendFundFormGroup.controls.minConfValue.setValidators(null),this.sendFundFormGroup.controls.minConfValue.setErrors(null))}),this.sendFundFormGroup.controls.selFeeRate.valueChanges.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.sendFundFormGroup.controls.customFeeRate.setValue(null),this.sendFundFormGroup.controls.customFeeRate.reset(),this.sendFundFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.sendFundFormGroup.controls.flgMinConf.value?null:[c.kI.required])}),(0,$i.a)([this.store.select(Se.dT),this.store.select(Se.Yj)]).pipe((0,f.R)(this.unSubs[1])).subscribe(([t,i])=>{this.fiatConversion=t.settings.fiatConversion,this.amountUnits=t.settings.currencyUnits,this.appConfig=i}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.information=t,this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")}),this.store.select(h.T4).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(i=>"confirmed"===i.status),"value"),this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[4]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL||t.type===s.sW.SET_CHANNEL_TRANSACTION_RES_CL)).subscribe(t=>{t.type===s.sW.SET_CHANNEL_TRANSACTION_RES_CL&&(this.store.dispatch((0,L.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch((0,L.QO)({payload:ji(this.passwordFormGroup.controls.password.value).toString()})),this.rtlEffects.isAuthorizedRes.pipe((0,z.q)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.sendFundError="",this.flgUseAllBalance&&(this.transaction.satoshis="all"),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.transaction.utxos=[],this.selUTXOs.forEach(t=>this.transaction.utxos.push(t.txid+":"+t.output))),this.sweepAll){if(!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||this.sendFundFormGroup.controls.flgMinConf.value&&(!this.sendFundFormGroup.controls.minConfValue.value||this.sendFundFormGroup.controls.minConfValue.value<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis="all",this.transaction.address=this.sendFundFormGroup.controls.transactionAddress.value,this.sendFundFormGroup.controls.flgMinConf.value?(delete this.transaction.feeRate,this.transaction.minconf=this.sendFundFormGroup.controls.flgMinConf.value?this.sendFundFormGroup.controls.minConfValue.value:null):(delete this.transaction.minconf,this.transaction.feeRate="customperkb"===this.sendFundFormGroup.controls.selFeeRate.value&&!this.sendFundFormGroup.controls.flgMinConf.value&&this.sendFundFormGroup.controls.customFeeRate.value?1e3*this.sendFundFormGroup.controls.customFeeRate.value+"perkb":this.sendFundFormGroup.controls.selFeeRate.value),delete this.transaction.utxos,this.store.dispatch((0,T.Wi)({payload:this.transaction}))}else{if(this.transaction.minconf=this.flgMinConf?this.minConfValue:null,this.transaction.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,!this.transaction.address||""===this.transaction.address||!this.transaction.satoshis||+this.transaction.satoshis<=0||this.flgMinConf&&(!this.transaction.minconf||this.transaction.minconf<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis&&"all"!==this.transaction.satoshis&&this.selAmountUnit!==s.NT.SATS?this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?s.NT.OTHER:this.selAmountUnit,s.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,f.R)(this.unSubs[5])).subscribe({next:t=>{this.transaction.satoshis=t[s.NT.SATS],this.selAmountUnit=s.NT.SATS,this.store.dispatch((0,T.Wi)({payload:this.transaction}))},error:t=>{this.transaction.satoshis=null,this.selAmountUnit=s.NT.SATS,this.amountError="Conversion Error: "+t}}):this.store.dispatch((0,T.Wi)({payload:this.transaction}))}}resetData(){this.sendFundError="",this.transaction={},this.flgMinConf=!1,this.totalSelectedUTXOAmount=null,this.selUTXOs=[],this.flgUseAllBalance=!1,this.selAmountUnit=s.uA[0]}stepSelectionChanged(t){switch(this.sendFundError="",t.selectedIndex){default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+(this.sendFundFormGroup.controls.flgMinConf.value?" | Min Confirmation Blocks: "+this.sendFundFormGroup.controls.minConfValue.value:this.sendFundFormGroup.controls.selFeeRate.value?" | Fee Rate: "+this.feeRateTypes.find(i=>i.feeRateId===this.sendFundFormGroup.controls.selFeeRate.value).feeRateType:"")}t.selectedIndex0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((o,l)=>(i.value=o.value+l.value,i)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=null,this.transaction.satoshis=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.flgUseAllBalance?(this.transaction.satoshis=this.totalSelectedUTXOAmount,this.selAmountUnit=s.uA[0]):this.transaction.satoshis=null}onAmountUnitChange(t){const i=this,o=this.selAmountUnit===this.amountUnits[2]?s.NT.OTHER:this.selAmountUnit;let l=t.value===this.amountUnits[2]?s.NT.OTHER:t.value;this.transaction.satoshis&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(+this.transaction.satoshis,o,l,this.amountUnits[2],this.fiatConversion).pipe((0,f.R)(this.unSubs[6])).subscribe({next:d=>{this.selAmountUnit=t.value,i.transaction.satoshis=i.decimalPipe.transform(d[l],i.currencyUnitFormats[l]).replace(/,/g,"")},error:d=>{i.transaction.satoshis=null,this.amountError="Conversion Error: "+d,this.selAmountUnit=o,l=o}})}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.selUTXOs.length&&this.selUTXOs.length>0?"Advanced Options | Selected UTXOs: "+this.selUTXOs.length+" | Selected UTXO Amount: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats":"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v),e.Y36(u.JJ),e.Y36(H.eX),e.Y36(c.qu),e.Y36(W.V),e.Y36(j.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-send-modal"]],viewQuery:function(t,i){if(1&t&&(e.Gf(ea,7),e.Gf(ta,5),e.Gf(na,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.formSweepAll=o.first),e.iGM(o=e.CRH())&&(i.stepper=o.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amount","tabindex","2","required","",3,"ngModel","type","step","min","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxLayout","column","fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","35","fxLayoutAlign","start end"],["tabindex","8","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","60","tabindex","9","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","default","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","default",3,"click"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.YNc(9,_a,37,31,"form",7),e.qZA(),e.qZA(),e.qZA(),e.YNc(10,wa,40,23,"ng-template",null,8,e.W1O)),2&t){const o=e.MAs(11);e.xp6(5),e.Oqu(i.sweepAll?"Sweep All Funds":"Send Funds"),e.xp6(1),e.Q6J("mat-dialog-close",!1),e.xp6(3),e.Q6J("ngIf",!i.sweepAll)("ngIfElse",o)}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,u.O5,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.Q7,c.JJ,c.On,X.q,g.R9,R.gD,u.sg,le.oG,u.mk,q.oO,c.wV,c.qQ,g.TO,g.bx,B.ey,ee.ib,ee.yz,ee.yK,R.$L,oe.Rr,Q.gM,N.BN,K.Vq,K.C0,c.sg,K.VY,c.u,K.Ic],pipes:[u.JJ],styles:[""]}),n})();var de=_(2737);function qa(n,a){1&n&&e._UZ(0,"mat-progress-bar",27)}function Fa(n,a){1&n&&(e.TgZ(0,"th",28),e._uU(1," Transaction ID "),e.qZA())}function Oa(n,a){1&n&&(e.TgZ(0,"span",36),e.TgZ(1,"mat-icon",37),e._uU(2,"warning"),e.qZA(),e.qZA())}function Ra(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Oa,3,0,"span",35),e.qZA()),2&n){const t=e.oxw().$implicit;e.oxw();const i=e.MAs(32);e.xp6(1),e.Q6J("ngIf",t.value<1e3)("ngIfElse",i)}}function Ua(n,a){1&n&&e._UZ(0,"span",38)}function Na(n,a){if(1&n&&(e._UZ(0,"span",39),e.ALo(1,"titlecase")),2&n){const t=e.oxw().$implicit;e.s9C("matTooltip",e.lcZ(1,1,t.status))}}const ka=function(n){return{"max-width":n}};function Ia(n,a){if(1&n&&(e.TgZ(0,"td",29),e.TgZ(1,"span",30),e.YNc(2,Ra,2,2,"span",31),e.YNc(3,Ua,1,0,"span",32),e.YNc(4,Na,2,3,"span",33),e.TgZ(5,"span",34),e._uU(6),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(5,ka,i.screenSize===i.screenSizeEnum.XS?"10rem":"50rem")),e.xp6(1),e.Q6J("ngIf",i.numDustUTXOs>0&&!i.isDustUTXO),e.xp6(1),e.Q6J("ngIf","confirmed"===t.status),e.xp6(1),e.Q6J("ngIf","confirmed"!==t.status),e.xp6(2),e.Oqu(t.txid)}}function Ma(n,a){1&n&&(e.TgZ(0,"th",40),e._uU(1," Output "),e.qZA())}function Ea(n,a){if(1&n&&(e.TgZ(0,"td",29),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.output)," ")}}function Da(n,a){1&n&&(e.TgZ(0,"th",40),e._uU(1," Value (Sats) "),e.qZA())}function Pa(n,a){if(1&n&&(e.TgZ(0,"span",41),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.value))}}function Ja(n,a){if(1&n&&(e.TgZ(0,"span",44),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij("(",e.lcZ(2,1,-1*t.value),")")}}function Qa(n,a){if(1&n&&(e.TgZ(0,"td",29),e.YNc(1,Pa,3,3,"span",42),e.YNc(2,Ja,3,3,"span",43),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",t.value>0||0===t.value),e.xp6(1),e.Q6J("ngIf",t.value<0)}}function Ya(n,a){1&n&&(e.TgZ(0,"th",40),e._uU(1," Blockheight "),e.qZA())}function Ba(n,a){if(1&n&&(e.TgZ(0,"td",29),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.blockheight)," ")}}function Ha(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",45),e.TgZ(1,"div",46),e.TgZ(2,"mat-select",47),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",48),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Va(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",49),e.TgZ(1,"button",50),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onUTXOClick(d,o)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function za(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No utxos available."),e.qZA())}function Ga(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting utxos..."),e.qZA())}function Xa(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Wa(n,a){if(1&n&&(e.TgZ(0,"td",51),e.YNc(1,za,2,0,"p",31),e.YNc(2,Ga,2,0,"p",31),e.YNc(3,Xa,2,1,"p",31),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Ka=function(n){return{"display-none":n}};function $a(n,a){if(1&n&&e._UZ(0,"tr",52),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Ka,(null==t.listUTXOs?null:t.listUTXOs.data)&&(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)>0))}}function ja(n,a){1&n&&e._UZ(0,"tr",53)}function eo(n,a){1&n&&e._UZ(0,"tr",54)}function to(n,a){1&n&&e._UZ(0,"mat-icon",37)}const no=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},io=function(){return["no_utxo"]};let ao=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.numDustUTXOs=0,this.isDustUTXO=!1,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["txid","value","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["txid","output","value","blockheight","actions"]):(this.flgSticky=!0,this.displayedColumns=["txid","output","value","blockheight","actions"])}ngOnInit(){this.store.select(h.T4).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.logger.info(t)})}ngAfterViewInit(){this.utxos&&this.utxos.length>0&&this.sort&&this.paginator&&this.loadUTXOsTable(this.utxos)}ngOnChanges(){this.utxos&&this.utxos.length>0&&this.loadUTXOsTable(this.utxos)}applyFilter(){this.listUTXOs.filter=this.selFilter.trim().toLowerCase()}onUTXOClick(t,i){const o=[[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"output",value:t.output,title:"Output",width:50,type:s.Gi.NUMBER},{key:"value",value:t.value,title:"Value (Sats)",width:50,type:s.Gi.NUMBER}],[{key:"status",value:this.commonService.titleCase(t.status),title:"Status",width:50,type:s.Gi.STRING},{key:"blockheight",value:t.blockheight,title:"Blockheight",width:50,type:s.Gi.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100}]];this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"UTXO Information",message:o}}}))}loadUTXOsTable(t){this.listUTXOs=new r.by([...t]),this.listUTXOs.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.listUTXOs.sort=this.sort,this.listUTXOs.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.listUTXOs.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listUTXOs)}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-utxos"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{numDustUTXOs:"numDustUTXOs",isDustUTXO:"isDustUTXO",utxos:"utxos"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("UTXOs")}]),e.TTD],decls:33,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"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","txid"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","blockheight"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_utxo"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[4,"ngIf"],["class","dot green","matTooltip","Confirmed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltipPosition","right",3,"matTooltip",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start center","color","warn",1,"mr-1"],["matTooltip","Confirmed","matTooltipPosition","right",1,"dot","green"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center",1,"red"],["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"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"input",4),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(5,"div",5),e.TgZ(6,"div",6),e.YNc(7,qa,1,0,"mat-progress-bar",7),e.TgZ(8,"table",8,9),e.ynx(10,10),e.YNc(11,Fa,2,0,"th",11),e.YNc(12,Ia,7,7,"td",12),e.BQk(),e.ynx(13,13),e.YNc(14,Ma,2,0,"th",14),e.YNc(15,Ea,4,3,"td",12),e.BQk(),e.ynx(16,15),e.YNc(17,Da,2,0,"th",14),e.YNc(18,Qa,3,2,"td",12),e.BQk(),e.ynx(19,16),e.YNc(20,Ya,2,0,"th",14),e.YNc(21,Ba,4,3,"td",12),e.BQk(),e.ynx(22,17),e.YNc(23,Ha,6,0,"th",18),e.YNc(24,Va,3,0,"td",19),e.BQk(),e.ynx(25,20),e.YNc(26,Wa,4,3,"td",21),e.BQk(),e.YNc(27,$a,1,3,"tr",22),e.YNc(28,ja,1,0,"tr",23),e.YNc(29,eo,1,0,"tr",24),e.qZA(),e._UZ(30,"mat-paginator",25),e.qZA(),e.qZA(),e.qZA(),e.YNc(31,to,1,0,"ng-template",null,26,e.W1O)),2&t&&(e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(3),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.listUTXOs)("ngClass",e.VKq(11,no,""!==i.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(13,io)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,pe.Hw,R.gD,R.$L,B.ey,U.lW,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.rS,u.JJ],styles:[".mat-column-txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var fe=_(4377);function oo(n,a){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numUtxos)}}function so(n,a){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"Dust UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numDustUtxos)}}let lo=(()=>{class n{constructor(t,i){this.logger=t,this.store=i,this.selectedTableIndex=0,this.selectedTableIndexChange=new e.vpe,this.utxos=[],this.numUtxos=0,this.dustUtxos=[],this.numDustUtxos=0,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.store.select(h.T4).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length,this.dustUtxos=t.utxos.filter(i=>+i.value<1e3),this.numDustUtxos=this.dustUtxos.length),t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length),this.logger.info(t)})}onSelectedIndexChanged(t){this.selectedTableIndexChange.emit(t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:8,vars:7,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["xLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["fxLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"mat-tab-group",1),e.NdJ("selectedIndexChange",function(l){return i.onSelectedIndexChanged(l)}),e.TgZ(2,"mat-tab"),e.YNc(3,oo,2,1,"ng-template",2),e._UZ(4,"rtl-cl-on-chain-utxos",3),e.qZA(),e.TgZ(5,"mat-tab"),e.YNc(6,so,2,1,"ng-template",2),e._UZ(7,"rtl-cl-on-chain-utxos",4),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("selectedIndex",i.selectedTableIndex),e.xp6(3),e.Q6J("utxos",i.utxos)("numDustUTXOs",i.numDustUtxos)("isDustUTXO",!1),e.xp6(3),e.Q6J("utxos",i.dustUtxos)("numDustUTXOs",i.numDustUtxos)("isDustUTXO",!0))},directives:[p.xw,p.yH,p.Wh,k.SP,k.uX,k.uD,ao,fe.k],styles:[""]}),n})();const ro=function(n,a){return[n,a]};function co(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=null==l?null:l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.Q6J("active",i.activeLink===(null==t?null:t.link))("routerLink",e.WLB(3,ro,null==t?null:t.link,null==i.selectedTable?null:i.selectedTable.name)),e.xp6(1),e.Oqu(null==t?null:t.name)}}let uo=(()=>{class n{constructor(t,i,o){this.store=t,this.router=i,this.activatedRoute=o,this.selNode={},this.faExchangeAlt=x.Ssp,this.faChartPie=x.OS1,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"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(i=>i.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link,this.selectedTable=this.tables.find(l=>l.name===i.urlAfterRedirects.substring(i.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[1])).subscribe(i=>{this.selNode=i}),this.store.select(h.Rn).pipe((0,f.R)(this.unSubs[2])).subscribe(i=>{this.balances=[{title:"Total Balance",dataValue:i.balance.totalBalance||0},{title:"Confirmed",dataValue:i.balance.confBalance},{title:"Unconfirmed",dataValue:i.balance.unconfBalance}]})}openSendFundsModal(t){this.store.dispatch((0,L.qR)({payload:{data:{sweepAll:t,component:qe}}}))}onSelectedTableIndexChanged(t){this.selectedTable=this.tables.find(i=>i.id===t),this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(C.F0),e.Y36(C.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain"]],decls:21,vars:5,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,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"On-chain Transactions"),e.qZA(),e.qZA(),e.TgZ(12,"div",6),e.TgZ(13,"mat-card"),e.TgZ(14,"mat-card-content",4),e.TgZ(15,"nav",7),e.YNc(16,co,2,6,"div",8),e.qZA(),e.TgZ(17,"div",9),e._UZ(18,"router-outlet"),e.qZA(),e.TgZ(19,"div",10),e.TgZ(20,"rtl-cl-utxo-tables",11),e.NdJ("selectedTableIndexChange",function(l){return i.onSelectedTableIndexChanged(l)}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartPie),e.xp6(6),e.Q6J("values",i.balances),e.xp6(2),e.Q6J("icon",i.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",i.links),e.xp6(4),e.Q6J("selectedTableIndex",null==i.selectedTable?null:i.selectedTable.id))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,de.D,k.BU,u.sg,p.yH,C.lC,lo,k.Nj,C.rH],styles:[""]}),n})();function po(n,a){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Channels"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activeChannels)}}function mo(n,a){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Peers"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activePeers)}}let fo=(()=>{class n{constructor(t,i,o){this.store=t,this.logger=i,this.router=o,this.activePeers=0,this.activeChannels=0,this.faUsers=x.FVb,this.faChartPie=x.OS1,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 m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(t=>t instanceof C.Av)).subscribe(t=>{this.activeLink=this.links.findIndex(i=>i.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.activeChannels=t.activeChannels.length||0}),this.store.select(h.Wi).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.logger.info(t)}),this.store.select(h.Rn).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.balances=[{title:"Total Balance",dataValue:t.balance.totalBalance||0},{title:"Confirmed",dataValue:t.balance.confBalance},{title:"Unconfirmed",dataValue:t.balance.unconfBalance}]})}onSelectedTabChange(t){this.router.navigateByUrl("/cl/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(F.mQ),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Connections"),e.qZA(),e.qZA(),e.TgZ(12,"div",6),e.TgZ(13,"mat-card"),e.TgZ(14,"mat-card-content",4),e.TgZ(15,"mat-tab-group",7),e.NdJ("selectedIndexChange",function(l){return i.activeLink=l})("selectedTabChange",function(l){return i.onSelectedTabChange(l)}),e.TgZ(16,"mat-tab"),e.YNc(17,po,2,1,"ng-template",8),e.qZA(),e.TgZ(18,"mat-tab"),e.YNc(19,mo,2,1,"ng-template",8),e.qZA(),e.qZA(),e.TgZ(20,"div",9),e._UZ(21,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartPie),e.xp6(6),e.Q6J("values",i.balances),e.xp6(2),e.Q6J("icon",i.faUsers),e.xp6(6),e.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,de.D,k.SP,k.uX,k.uD,p.yH,C.lC,fe.k],styles:[""]}),n})();function _o(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",11),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let ho=(()=>{class n{constructor(t,i,o){this.logger=t,this.store=i,this.router=o,this.faExchangeAlt=x.Ssp,this.faChartPie=x.OS1,this.currencyUnits=[],this.routerUrl="",this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.selNode={},this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link,this.routerUrl=i.urlAfterRedirects}),this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[1])).subscribe(i=>{if(this.selNode=i,this.selNode.enableOffers){this.store.dispatch((0,T.yl)()),this.store.dispatch((0,T.rs)()),this.links.push({link:"offers",name:"Offers"}),this.links.push({link:"paidoffr",name:"Paid Offers"});const o=this.links.find(l=>this.router.url.includes(l.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(h.Wj).pipe((0,f.R)(this.unSubs[2]),(0,ie.M)(this.store.select(h.Jo))).subscribe(([i,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===s.ol.OPERATOR?[{title:"Local Capacity",dataValue:i.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:i.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:i.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:i.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(i)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Lightning Balance"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",6),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Lightning Transactions"),e.qZA(),e.qZA(),e.TgZ(12,"div",7),e.TgZ(13,"mat-card"),e.TgZ(14,"mat-card-content",4),e.TgZ(15,"nav",8),e.YNc(16,_o,2,3,"div",9),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartPie),e.xp6(6),e.Q6J("values",i.balances),e.xp6(2),e.Q6J("icon",i.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,de.D,k.BU,u.sg,p.yH,C.lC,k.Nj,C.rH],styles:[""]}),n})();function go(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",11),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let Co=(()=>{class n{constructor(t){this.router=t,this.faMapSigns=x.SuH,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"routingpeers",name:"Routing Peers"},{link:"failedtransactions",name:"Failed Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-routing"]],decls:13,vars:2,consts:[["fxLayout","column",1,"mb-2"],["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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"fa-icon",2),e.TgZ(3,"span",3),e._uU(4,"Routing"),e.qZA(),e.qZA(),e.TgZ(5,"div",4),e.TgZ(6,"mat-card",5),e.TgZ(7,"mat-card-content",6),e.TgZ(8,"div",7),e.TgZ(9,"nav",8),e.YNc(10,go,2,3,"div",9),e.qZA(),e.qZA(),e.TgZ(11,"div",10),e._UZ(12,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(2),e.Q6J("icon",i.faMapSigns),e.xp6(8),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,p.yH,Z.a8,Z.dn,k.BU,u.sg,C.lC,k.Nj,C.rH],styles:[""]}),n})();var te=_(1979);function xo(n,a){if(1&n&&(e.TgZ(0,"span",6),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t)}}function To(n,a){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Type"),e.qZA())}function yo(n,a){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.type," ")}}function Zo(n,a){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Address"),e.qZA())}function Ao(n,a){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.address," ")}}function Lo(n,a){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Port"),e.qZA())}function vo(n,a){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.port," ")}}function bo(n,a){1&n&&(e.TgZ(0,"th",29),e.TgZ(1,"span",30),e._uU(2,"Actions"),e.qZA(),e.qZA())}function So(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",31),e.TgZ(1,"span",30),e.TgZ(2,"button",32),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyNodeURI(o)}),e._uU(3,"Copy Node URI"),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw(2);e.xp6(2),e.Q6J("payload",(null==i.lookupResult?null:i.lookupResult.nodeid)+"@"+t.address+":"+t.port)}}function wo(n,a){1&n&&e._UZ(0,"tr",33)}function qo(n,a){1&n&&e._UZ(0,"tr",34)}const Fo=function(n){return{"background-color":n}};function Oo(n,a){if(1&n&&(e.TgZ(0,"div",1),e._UZ(1,"mat-divider",2),e.TgZ(2,"div",3),e.TgZ(3,"div",4),e.TgZ(4,"h4",5),e._uU(5,"Alias"),e.qZA(),e.TgZ(6,"span",6),e._uU(7),e.TgZ(8,"span",7),e._uU(9),e.qZA(),e.qZA(),e.qZA(),e.TgZ(10,"div",8),e.TgZ(11,"h4",5),e._uU(12,"Pub Key"),e.qZA(),e.TgZ(13,"span",9),e._uU(14),e.qZA(),e.qZA(),e.qZA(),e._UZ(15,"mat-divider",10),e.TgZ(16,"div",3),e.TgZ(17,"div",4),e.TgZ(18,"h4",5),e._uU(19,"Last Update"),e.qZA(),e.TgZ(20,"span",6),e._uU(21),e.ALo(22,"date"),e.qZA(),e.qZA(),e.TgZ(23,"div",8),e.TgZ(24,"h4",5),e._uU(25,"Features"),e.qZA(),e.YNc(26,xo,2,1,"span",11),e.qZA(),e.qZA(),e._UZ(27,"mat-divider",10),e.TgZ(28,"div",12),e.TgZ(29,"h4",13),e._uU(30,"Addresses"),e.qZA(),e.TgZ(31,"div",14),e.TgZ(32,"table",15,16),e.ynx(34,17),e.YNc(35,To,2,0,"th",18),e.YNc(36,yo,2,1,"td",19),e.BQk(),e.ynx(37,20),e.YNc(38,Zo,2,0,"th",18),e.YNc(39,Ao,2,1,"td",19),e.BQk(),e.ynx(40,21),e.YNc(41,Lo,2,0,"th",18),e.YNc(42,vo,2,1,"td",19),e.BQk(),e.ynx(43,22),e.YNc(44,bo,3,0,"th",23),e.YNc(45,So,4,1,"td",24),e.BQk(),e.YNc(46,wo,1,0,"tr",25),e.YNc(47,qo,1,0,"tr",26),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==t.lookupResult?null:t.lookupResult.alias),e.xp6(1),e.Q6J("ngStyle",e.VKq(15,Fo,"#"+(null==t.lookupResult?null:t.lookupResult.color))),e.xp6(1),e.Oqu(null!=t.lookupResult&&t.lookupResult.color?"#"+(null==t.lookupResult?null:t.lookupResult.color):""),e.xp6(5),e.Oqu(null==t.lookupResult?null:t.lookupResult.nodeid),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(22,12,1e3*(null==t.lookupResult?null:t.lookupResult.last_timestamp),"dd/MMM/YYYY HH:mm")),e.xp6(5),e.Q6J("ngForOf",t.featureDescriptions),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Q6J("dataSource",t.addresses),e.xp6(14),e.Q6J("matHeaderRowDef",t.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}let Ro=(()=>{class n{constructor(t,i){this.logger=t,this.snackBar=i,this.featureDescriptions=[],this.displayedColumns=["type","address","port","actions"]}ngOnInit(){if(this.addresses=new r.by(this.lookupResult&&this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(t,i)=>t[i]&&isNaN(t[i])?t[i].toLocaleLowerCase():t[i]?+t[i]:null,this.lookupResult.features&&""!==this.lookupResult.features.trim()){const t=parseInt(this.lookupResult.features,16);s._C.forEach(i=>{t&(1<{class n{constructor(t){this.store=t,this.lookupResult=[],this.node1_match=!1,this.node2_match=!1,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.store.select(h.W3).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.lookupResult.length>0&&this.lookupResult[0].source===t.id&&(this.node1_match=!0),this.lookupResult.length>1&&this.lookupResult[1].source===t.id&&(this.node2_match=!0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],[3,"inset"],["fxLayout","column","fxFlex","20",1,"my-1"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","10",1,"my-1"],[1,"page-title","font-bold-500"]],template:function(t,i){1&t&&e.YNc(0,Mo,204,91,"div",0),2&t&&e.Q6J("ngIf",i.lookupResult)},directives:[u.O5,p.xw,G.d,p.Wh,p.yH],pipes:[u.JJ,u.uU],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),n})();const Do=["form"];function Po(n,a){if(1&n&&(e.TgZ(0,"mat-radio-button",17),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("value",t.id)("checked",i.selectedFieldId===t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Jo(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function Qo(n,a){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"rtl-cl-node-lookup",26),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("lookupResult",t.nodeLookupValue)}}function Yo(n,a){if(1&n&&(e.TgZ(0,"span",24),e.YNc(1,Qo,2,1,"div",25),e.qZA()),2&n){const t=e.oxw(2),i=e.MAs(19);e.xp6(1),e.Q6J("ngIf",""!==t.nodeLookupValue.nodeid)("ngIfElse",i)}}function Bo(n,a){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"rtl-cl-channel-lookup",26),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("lookupResult",t.channelLookupValue)}}function Ho(n,a){if(1&n&&(e.TgZ(0,"span",24),e.YNc(1,Bo,2,1,"div",25),e.qZA()),2&n){const t=e.oxw(2),i=e.MAs(19);e.xp6(1),e.Q6J("ngIf",t.channelLookupValue.length>0)("ngIfElse",i)}}function Vo(n,a){1&n&&(e.TgZ(0,"span",24),e.TgZ(1,"h3"),e._uU(2,"Error! Unable to find details!"),e.qZA(),e.qZA())}function zo(n,a){if(1&n&&(e.TgZ(0,"div",18),e.TgZ(1,"div",19),e.TgZ(2,"span",20),e._uU(3),e.qZA(),e.qZA(),e.TgZ(4,"div",21),e.YNc(5,Yo,2,2,"span",22),e.YNc(6,Ho,2,2,"span",22),e.YNc(7,Vo,3,0,"span",23),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(3),e.hij("",t.lookupFields[t.selectedFieldId].name," Details"),e.xp6(1),e.Q6J("ngSwitch",t.selectedFieldId),e.xp6(1),e.Q6J("ngSwitchCase",0),e.xp6(1),e.Q6J("ngSwitchCase",1)}}function Go(n,a){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find details!"),e.qZA())}const Xo=function(n){return{"mt-1":!0,"mt-2":n}};let Wo=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.commonService=i,this.store=o,this.actions=l,this.lookupKey="",this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=x.wn1,this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(t=>t.type===s.sW.SET_LOOKUP_CL||t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{if(t.type===s.sW.SET_LOOKUP_CL){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue="object"!=typeof t.payload[0]?{nodeid:""}:JSON.parse(JSON.stringify(t.payload[0]));break;case 1:this.channelLookupValue="object"!=typeof t.payload[0]?[]:JSON.parse(JSON.stringify(t.payload))}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.selectedFieldId){case 0:this.store.dispatch((0,T.Sf)({payload:this.lookupKey.trim()}));break;case 1:this.store.dispatch((0,T.$A)({payload:{uiMessage:s.m6.SEARCHING_CHANNEL,shortChannelID:this.lookupKey.trim(),showError:!1}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lookups"]],viewQuery:function(t,i){if(1&t&&e.Gf(Do,7),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first)}},decls:20,vars:9,consts:[["fxLayout","column"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[4,"ngIf"],["fxLayout","row","fxFlex","100",1,"mt-1"],["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",""],[1,"mr-4",3,"value","checked"],["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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-content",2),e.TgZ(3,"form",3,4),e.TgZ(5,"div",5),e.TgZ(6,"mat-radio-group",6),e.NdJ("ngModelChange",function(l){return i.selectedFieldId=l})("change",function(l){return i.onSelectChange(l)}),e.YNc(7,Po,2,3,"mat-radio-button",7),e.qZA(),e.qZA(),e.TgZ(8,"mat-form-field",8),e.TgZ(9,"input",9,10),e.NdJ("change",function(){return i.clearLookupValue()})("ngModelChange",function(l){return i.lookupKey=l}),e.qZA(),e.YNc(11,Jo,2,1,"mat-error",11),e.qZA(),e.TgZ(12,"div",12),e.TgZ(13,"button",13),e.NdJ("click",function(){return i.resetData()}),e._uU(14,"Clear"),e.qZA(),e.TgZ(15,"button",14),e.NdJ("click",function(){return i.onLookup()}),e._uU(16,"Lookup"),e.qZA(),e.qZA(),e.qZA(),e.YNc(17,zo,8,4,"div",15),e.qZA(),e.qZA(),e.qZA(),e.YNc(18,Go,2,0,"ng-template",null,16,e.W1O)),2&t&&(e.xp6(6),e.Q6J("ngModel",i.selectedFieldId),e.xp6(1),e.Q6J("ngForOf",i.lookupFields),e.xp6(1),e.Q6J("ngClass",e.VKq(7,Xo,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM)),e.xp6(1),e.Q6J("placeholder",(null==i.lookupFields[i.selectedFieldId]?null:i.lookupFields[i.selectedFieldId].placeholder)||"Lookup Key")("ngModel",i.lookupKey),e.xp6(2),e.Q6J("ngIf",!i.lookupKey),e.xp6(6),e.Q6J("ngIf",i.flgSetLookupValue))},directives:[p.xw,p.yH,p.Wh,Z.dn,c._Y,c.JL,c.F,se.VQ,c.JJ,c.On,u.sg,g.KE,u.mk,q.oO,I.Nt,c.Fj,c.Q7,u.O5,U.lW,se.U0,g.TO,u.RF,u.n9,u.ED,Ro,Eo],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var ne=(()=>{return(n=ne||(ne={})).KB="KB",n.KW="KW",ne;var n})();function Ko(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div",4),e.TgZ(3,"h4",5),e._uU(4,"Opening"),e.qZA(),e.TgZ(5,"div",6),e._uU(6),e.ALo(7,"number"),e.qZA(),e.qZA(),e.TgZ(8,"div",7),e.TgZ(9,"h4",5),e._uU(10,"Mutual Close"),e.qZA(),e.TgZ(11,"div",6),e._uU(12),e.ALo(13,"number"),e.qZA(),e.qZA(),e.TgZ(14,"div",8),e.TgZ(15,"h4",5),e._uU(16,"Unilateral Close"),e.qZA(),e.TgZ(17,"div",6),e._uU(18),e.ALo(19,"number"),e.qZA(),e.qZA(),e.TgZ(20,"div",9),e.TgZ(21,"h4",5),e._uU(22,"Delayed To Us"),e.qZA(),e.TgZ(23,"div",6),e._uU(24),e.ALo(25,"number"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(26,"div",3),e.TgZ(27,"div",10),e.TgZ(28,"h4",5),e._uU(29,"Minimum Acceptable"),e.qZA(),e.TgZ(30,"div",6),e._uU(31),e.ALo(32,"number"),e.qZA(),e.qZA(),e.TgZ(33,"div",11),e.TgZ(34,"h4",5),e._uU(35,"Maximum Acceptable"),e.qZA(),e.TgZ(36,"div",6),e._uU(37),e.ALo(38,"number"),e.qZA(),e.qZA(),e.TgZ(39,"div",12),e.TgZ(40,"h4",5),e._uU(41,"HTLC Resolution"),e.qZA(),e.TgZ(42,"div",6),e._uU(43),e.ALo(44,"number"),e.qZA(),e.qZA(),e.TgZ(45,"div",13),e.TgZ(46,"h4",5),e._uU(47,"Penalty"),e.qZA(),e.TgZ(48,"div",6),e._uU(49),e.ALo(50,"number"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(e.lcZ(7,8,null==t.perkbw?null:t.perkbw.opening)),e.xp6(6),e.Oqu(e.lcZ(13,10,null==t.perkbw?null:t.perkbw.mutual_close)),e.xp6(6),e.Oqu(e.lcZ(19,12,null==t.perkbw?null:t.perkbw.unilateral_close)),e.xp6(6),e.Oqu(e.lcZ(25,14,null==t.perkbw?null:t.perkbw.delayed_to_us)),e.xp6(7),e.Oqu(e.lcZ(32,16,null==t.perkbw?null:t.perkbw.min_acceptable)),e.xp6(6),e.Oqu(e.lcZ(38,18,null==t.perkbw?null:t.perkbw.max_acceptable)),e.xp6(6),e.Oqu(e.lcZ(44,20,null==t.perkbw?null:t.perkbw.htlc_resolution)),e.xp6(6),e.Oqu(e.lcZ(50,22,null==t.perkbw?null:t.perkbw.penalty))}}function $o(n,a){if(1&n&&(e.TgZ(0,"div",14),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let jo=(()=>{class n{constructor(){this.perkbw={}}ngAfterContentChecked(){this.feeRateStyle===ne.KB?this.perkbw=this.feeRates.perkb:this.feeRateStyle===ne.KW&&(this.perkbw=this.feeRates.perkw)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-fee-rates"]],inputs:{feeRateStyle:"feeRateStyle",feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["matTooltip","Default feerate for fundchannel and withdraw","matTooltipPosition","below"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Feerate to aim for in cooperative shutdown. Note that since mutual close is a negotiation, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer","matTooltipPosition","below"],["matTooltip","Feerate for commitment_transaction in a live channel which we originally funded","matTooltipPosition","below"],["matTooltip","Feerate for returning unilateral close funds to our wallet","matTooltipPosition","below"],["matTooltip","The smallest feerate that you can use, usually the minimum relayed feerate of the backend","matTooltipPosition","below"],["matTooltip","The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)","matTooltipPosition","below"],["matTooltip","Feerate for returning unilateral close HTLC outputs to our wallet","matTooltipPosition","below"],["matTooltip","Feerate to start at when penalizing a cheat attempt","matTooltipPosition","below"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,Ko,51,24,"div",0),e.YNc(1,$o,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,Q.gM],pipes:[u.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),n})();function es(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div",4),e.TgZ(3,"h4",5),e._uU(4,"Opening Channel"),e.qZA(),e.TgZ(5,"div",6),e._uU(6),e.ALo(7,"number"),e.qZA(),e.qZA(),e.TgZ(8,"div",7),e.TgZ(9,"h4",5),e._uU(10,"Mutual Close"),e.qZA(),e.TgZ(11,"div",6),e._uU(12),e.ALo(13,"number"),e.qZA(),e.qZA(),e.TgZ(14,"div",8),e.TgZ(15,"h4",5),e._uU(16,"Unilateral Close"),e.qZA(),e.TgZ(17,"div",6),e._uU(18),e.ALo(19,"number"),e.qZA(),e.qZA(),e.TgZ(20,"div",9),e._UZ(21,"h4",5),e._UZ(22,"div",6),e.qZA(),e.qZA(),e.TgZ(23,"div",3),e.TgZ(24,"div",10),e.TgZ(25,"h4",5),e._uU(26,"HTLC Timeout"),e.qZA(),e.TgZ(27,"div",6),e._uU(28),e.ALo(29,"number"),e.qZA(),e.qZA(),e.TgZ(30,"div",11),e.TgZ(31,"h4",5),e._uU(32,"HTLC Success"),e.qZA(),e.TgZ(33,"div",6),e._uU(34),e.ALo(35,"number"),e.qZA(),e.qZA(),e.TgZ(36,"div",9),e._UZ(37,"h4",5),e._UZ(38,"div",6),e.qZA(),e.TgZ(39,"div",9),e._UZ(40,"h4",5),e._UZ(41,"div",6),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(e.lcZ(7,5,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.opening_channel_satoshis)),e.xp6(6),e.Oqu(e.lcZ(13,7,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.mutual_close_satoshis)),e.xp6(6),e.Oqu(e.lcZ(19,9,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.unilateral_close_satoshis)),e.xp6(10),e.Oqu(e.lcZ(29,11,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_timeout_satoshis)),e.xp6(6),e.Oqu(e.lcZ(35,13,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_success_satoshis))}}function ts(n,a){if(1&n&&(e.TgZ(0,"div",12),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let ns=(()=>{class n{constructor(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-onchain-fee-estimates"]],inputs:{feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["matTooltip","Estimated cost of typical channel open","matTooltipPosition","below"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Estimated cost of typical channel close","matTooltipPosition","below"],["matTooltip","Estimated cost of typical unilateral close (without HTLCs)","matTooltipPosition","below"],["fxFlex","12"],["matTooltip","Estimated cost of typical HTLC timeout transaction","matTooltipPosition","below"],["matTooltip","Estimated cost of typical HTLC fulfillment transaction","matTooltipPosition","below"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,es,42,15,"div",0),e.YNc(1,ts,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,Q.gM],pipes:[u.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),n})();function is(n,a){1&n&&e._UZ(0,"mat-progress-bar",19)}function as(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",20),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function os(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-status-info",21),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function ss(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-info",22),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function ls(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function rs(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[6])}}function cs(n,a){if(1&n&&e._UZ(0,"rtl-cl-onchain-fee-estimates",24),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}const Fe=function(n){return{"dashboard-card-content":!0,"error-border":n}};function us(n,a){if(1&n&&(e.TgZ(0,"mat-grid-tile",4),e.TgZ(1,"div",5),e.TgZ(2,"div",6),e.TgZ(3,"div",7),e._UZ(4,"fa-icon",8),e.TgZ(5,"span"),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",9),e.TgZ(8,"mat-card",10),e.TgZ(9,"mat-card-content",11),e.YNc(10,is,1,0,"mat-progress-bar",12),e.TgZ(11,"div",13),e.YNc(12,as,1,2,"rtl-cl-node-info",14),e.YNc(13,os,1,2,"rtl-cl-channel-status-info",15),e.YNc(14,ss,1,2,"rtl-cl-fee-info",16),e.YNc(15,ls,1,3,"rtl-cl-fee-rates",17),e.YNc(16,rs,1,3,"rtl-cl-fee-rates",17),e.YNc(17,cs,1,2,"rtl-cl-onchain-fee-estimates",18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(4),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(3),e.Q6J("ngClass",e.VKq(13,Fe,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","status"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKB"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKW"),e.xp6(1),e.Q6J("ngSwitchCase","onChainFeeEstimates")}}function ps(n,a){if(1&n&&(e.TgZ(0,"mat-grid-list",2),e.YNc(1,us,18,15,"mat-grid-tile",3),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.nodeCardsOperator)}}function ms(n,a){1&n&&e._UZ(0,"mat-progress-bar",19)}function ds(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",20),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function fs(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-status-info",21),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function _s(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-info",22),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function hs(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function gs(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[5])}}function Cs(n,a){if(1&n&&e._UZ(0,"rtl-cl-onchain-fee-estimates",24),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}function xs(n,a){if(1&n&&(e.TgZ(0,"mat-grid-tile",4),e.TgZ(1,"div",5),e.TgZ(2,"div",6),e.TgZ(3,"div",25),e._UZ(4,"fa-icon",8),e.TgZ(5,"span"),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",9),e.TgZ(8,"mat-card",10),e.TgZ(9,"mat-card-content",11),e.YNc(10,ms,1,0,"mat-progress-bar",12),e.TgZ(11,"div",13),e.YNc(12,ds,1,2,"rtl-cl-node-info",14),e.YNc(13,fs,1,2,"rtl-cl-channel-status-info",15),e.YNc(14,_s,1,2,"rtl-cl-fee-info",16),e.YNc(15,hs,1,3,"rtl-cl-fee-rates",17),e.YNc(16,gs,1,3,"rtl-cl-fee-rates",17),e.YNc(17,Cs,1,2,"rtl-cl-onchain-fee-estimates",18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(4),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(3),e.Q6J("ngClass",e.VKq(13,Fe,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","status"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKB"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKW"),e.xp6(1),e.Q6J("ngSwitchCase","onChainFeeEstimates")}}function Ts(n,a){if(1&n&&(e.TgZ(0,"mat-grid-list",2),e.YNc(1,xs,18,15,"mat-grid-tile",3),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.nodeCardsMerchant)}}let ys=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.faBolt=x.BDt,this.faServer=x.xf3,this.faNetworkWired=x.kXW,this.faLink=x.nNP,this.selNode={},this.information={},this.channelsStatus={active:{},pending:{},inactive:{}},this.feeRatesPerKB={},this.feeRatesPerKW={},this.nodeCardsOperator=[],this.nodeCardsMerchant=[],this.screenSize="",this.screenSizeEnum=s.cu,this.userPersonaEnum=s.ol,this.errorMessages=["","","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFees=null,this.apiCallStatusFHistory=null,this.apiCallStatusPerKB=null,this.apiCallStatusPerKW=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:6,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:6,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:6,rows:1},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}]):(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:2,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:2,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:2,rows:3},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}])}ngOnInit(){this.store.select(h.Hz).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusNodeInfo.status===s.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1]),(0,ie.M)(this.store.select(h.Wj))).subscribe(([t,i])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusLRBal=t.apiCallStatus,this.apiCallStatusChannels=i.apiCallStatus,this.apiCallStatusLRBal.status===s.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message),this.apiCallStatusChannels.status===s.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.channelsStatus.active.capacity=i.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=i.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=i.localRemoteBalance.inactiveBalance||0}),this.store.select(h.JG).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===s.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusFHistory=t.apiCallStatus,this.apiCallStatusFHistory.status===s.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message),t.forwardingHistory&&t.forwardingHistory.length&&(this.fees.totalTxCount=t.forwardingHistory.length)}),this.store.select(h.zm).pipe((0,f.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[5]="",this.apiCallStatusPerKB=t.apiCallStatus,this.apiCallStatusPerKB.status===s.Bn.ERROR&&(this.errorMessages[5]="object"==typeof this.apiCallStatusPerKB.message?JSON.stringify(this.apiCallStatusPerKB.message):this.apiCallStatusPerKB.message),this.feeRatesPerKB=t.feeRatesPerKB}),this.store.select(h.hx).pipe((0,f.R)(this.unSubs[5])).subscribe(t=>{this.errorMessages[6]="",this.apiCallStatusPerKW=t.apiCallStatus,this.apiCallStatusPerKW.status===s.Bn.ERROR&&(this.errorMessages[6]="object"==typeof this.apiCallStatusPerKW.message?JSON.stringify(this.apiCallStatusPerKW.message):this.apiCallStatusPerKW.message),this.feeRatesPerKW=t.feeRatesPerKW})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-network-info"]],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","6","rowHeight","100px",4,"ngIf"],["cols","6","rowHeight","100px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-2"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxLayout","column","fxFlex","100",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","feeRateStyle","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","errorMessage",4,"ngSwitchCase"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],[1,"h-100",3,"feeRates","feeRateStyle","errorMessage"],[1,"h-100",3,"feeRates","errorMessage"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-15px"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,ps,2,1,"mat-grid-list",1),e.YNc(2,Ts,2,1,"mat-grid-list",1),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.OPERATOR),e.xp6(1),e.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.MERCHANT))},directives:[p.xw,p.Wh,u.O5,ae.Il,u.sg,ae.DX,p.yH,N.BN,Z.a8,Z.dn,u.mk,q.oO,u.RF,u.n9,P.pW,Te,Ze,ye,jo,ns],styles:[""]}),n})();function Zs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let As=(()=>{class n{constructor(t){this.router=t,this.faUserCheck=x.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-sign-verify-message"]],decls:11,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"],["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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Sign/Verify Message"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e.TgZ(7,"nav",5),e.YNc(8,Zs,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faUserCheck),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,k.BU,u.sg,p.yH,C.lC,k.Nj,C.rH],styles:[""]}),n})();var Ls=_(4240);function vs(n,a){if(1&n&&(e.TgZ(0,"mat-option",7),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.addressTp," ")}}let bs=(()=>{class n{constructor(t,i){this.store=t,this.clEffects=i,this.addressTypes=s._t,this.selectedAddressType=s._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,T._E)({payload:this.selectedAddressType})),this.clEffects.setNewAddressCL.pipe((0,z.q)(1)).subscribe(t=>{this.newAddress=t,setTimeout(()=>{this.store.dispatch((0,L.qR)({payload:{data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:Ls.n}}}))},0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(re.s))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","space-between end","fxLayoutAlign.gt-sm","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-form-field",2),e.TgZ(3,"mat-select",3),e.NdJ("ngModelChange",function(l){return i.selectedAddressType=l}),e.YNc(4,vs,2,2,"mat-option",4),e.qZA(),e.qZA(),e.TgZ(5,"div",5),e.TgZ(6,"button",6),e.NdJ("click",function(){return i.onGenerateAddress()}),e._uU(7,"Generate Address"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Q6J("ngModel",i.selectedAddressType),e.xp6(1),e.Q6J("ngForOf",i.addressTypes))},directives:[p.xw,p.Wh,g.KE,p.yH,R.gD,c.JJ,c.On,u.sg,U.lW,B.ey],styles:[""]}),n})(),Oe=(()=>{class n{constructor(t,i){this.store=t,this.activatedRoute=i,this.sweepAll=!1,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.activatedRoute.data.pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.sweepAll=t.sweepAll})}openSendFundsModal(){this.store.dispatch((0,L.qR)({payload:{data:{sweepAll:this.sweepAll,component:qe}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(C.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return i.openSendFundsModal()}),e._uU(3),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Oqu(i.sweepAll?"Sweep All":"Send Funds"))},directives:[p.xw,p.yH,p.Wh,U.lW],styles:[""]}),n})();var Ss=_(579),Re=_(2201),ws=_(4085),Ue=_(9851);const qs=["form"];function Fs(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t.alias?t.alias:t.id?t.id:"")}}function Os(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer alias is required."),e.qZA())}function Rs(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer not found in the list."),e.qZA())}function Us(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",39),e.NdJ("change",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.qZA(),e.TgZ(2,"mat-autocomplete",40,41),e.NdJ("optionSelected",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.YNc(4,Fs,2,2,"mat-option",26),e.ALo(5,"async"),e.qZA(),e.YNc(6,Os,2,0,"mat-error",17),e.YNc(7,Rs,2,0,"mat-error",17),e.qZA()}if(2&n){const t=e.MAs(3),i=e.oxw();e.xp6(1),e.Q6J("formControl",i.selectedPeer)("matAutocomplete",t),e.xp6(1),e.Q6J("displayWith",i.displayFn),e.xp6(2),e.Q6J("ngForOf",e.lcZ(5,6,i.filteredPeers)),e.xp6(2),e.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.required),e.xp6(1),e.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.notfound)}}function Ns(n,a){1&n&&e.GkF(0)}function ks(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Is(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function Ms(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function Es(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function Ds(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",43),e.TgZ(1,"input",44,45),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().customFeeRate=o}),e.qZA(),e.YNc(3,Es,2,0,"mat-error",17),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),e.xp6(2),e.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function Ps(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function Js(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",e.lcZ(2,2,t.value)," Sats")}}function Qs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",22),e.TgZ(1,"mat-form-field",46),e.TgZ(2,"mat-select",47),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().onUTXOSelectionChange(o)})("valueChange",function(o){return e.CHM(t),e.oxw().selUTXOs=o}),e.TgZ(3,"mat-select-trigger"),e._uU(4),e.ALo(5,"number"),e.qZA(),e.YNc(6,Js,3,4,"mat-option",26),e.qZA(),e.qZA(),e.TgZ(7,"mat-slide-toggle",48),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().flgUseAllBalance=o})("change",function(){return e.CHM(t),e.oxw().onUTXOAllBalanceChange()}),e._uU(8," Use selected UTXOs balance "),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("value",t.selUTXOs),e.xp6(2),e.AsE("",e.lcZ(5,6,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),e.xp6(2),e.Q6J("ngForOf",t.utxos),e.xp6(1),e.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function Ys(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.channelConnectionError)}}function Bs(n,a){if(1&n&&(e.TgZ(0,"div",49),e._UZ(1,"fa-icon",50),e.YNc(2,Ys,2,1,"span",17),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.channelConnectionError)}}function Hs(n,a){if(1&n&&(e.TgZ(0,"mat-expansion-panel",52),e.TgZ(1,"mat-expansion-panel-header"),e.TgZ(2,"mat-panel-title"),e.TgZ(3,"span"),e._uU(4,"Peer: \xa0"),e.qZA(),e.TgZ(5,"strong",53),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",9),e.TgZ(8,"div",0),e.TgZ(9,"div",1),e.TgZ(10,"h4",54),e._uU(11,"Pubkey"),e.qZA(),e.TgZ(12,"span",55),e._uU(13),e.qZA(),e.qZA(),e.qZA(),e._UZ(14,"mat-divider",56),e.TgZ(15,"div",0),e.TgZ(16,"div",57),e.TgZ(17,"h4",54),e._uU(18,"Address"),e.qZA(),e.TgZ(19,"span",58),e._uU(20),e.qZA(),e.qZA(),e.TgZ(21,"div",57),e.TgZ(22,"h4",54),e._uU(23,"Connected"),e.qZA(),e.TgZ(24,"span",58),e._uU(25),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw(2);e.xp6(6),e.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.id)),e.xp6(7),e.Oqu(t.peer.id),e.xp6(7),e.Oqu(null==t.peer?null:t.peer.netaddr),e.xp6(5),e.Oqu(t.peer.connected?"True":"False")}}function Vs(n,a){if(1&n&&e.YNc(0,Hs,26,4,"mat-expansion-panel",51),2&n){const t=e.oxw();e.Q6J("ngIf",t.peer)}}const zs=function(n,a){return{"mr-6":n,"mr-2":a}};let Ne=(()=>{class n{constructor(t,i,o,l,d,v){this.dialogRef=t,this.data=i,this.store=o,this.actions=l,this.decimalPipe=d,this.commonService=v,this.selectedPeer=new c.NI,this.faExclamationTriangle=x.eHv,this.isCompatibleVersion=!1,this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=0,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.fundingAmount=null,this.selectedPubkey="",this.isPrivate=!1,this.feeRateTypes=s.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.isCompatibleVersion=this.data.message.isCompatibleVersion,this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.utxos=this.data.message.utxos,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(o=>o.type===s.sW.UPDATE_API_CALL_STATUS_CL||o.type===s.sW.FETCH_CHANNELS_CL)).subscribe(o=>{o.type===s.sW.UPDATE_API_CALL_STATUS_CL&&o.payload.status===s.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===s.sW.FETCH_CHANNELS_CL&&this.dialogRef.close()});let t="",i="";this.sortedPeers=this.peers.sort((o,l)=>(t=o.alias?o.alias.toLowerCase():o.id?o.id.toLowerCase():"",i=l.alias?l.alias.toLowerCase():o.id.toLowerCase(),ti?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,f.R)(this.unSubs[1]),(0,Ss.O)(""),(0,Re.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.id),(0,Re.U)(o=>o?this.filterPeers(o):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(i=>0===i.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.id?t.id:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.id?this.selectedPeer.value.id:null,"string"==typeof this.selectedPeer.value){const t=this.peers.filter(i=>i.alias.length===this.selectedPeer.value.length&&0===i.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].id&&(this.selectedPubkey=t[0].id)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.flgMinConf=!1,this.selFeeRate="",this.minConfValue=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){t&&(this.flgMinConf||this.selFeeRate||this.selUTXOs.length&&0!==this.selUTXOs.length)?(this.advancedTitle="Advanced Options",this.flgMinConf&&(this.advancedTitle=this.advancedTitle+" | Min Confirmation Blocks: "+this.minConfValue),this.selFeeRate&&(this.advancedTitle=this.advancedTitle+" | Fee Rate: "+(this.customFeeRate?this.customFeeRate+" (Sats/vB)":this.feeRateTypes.find(i=>i.feeRateId===this.selFeeRate).feeRateType)),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.advancedTitle=this.advancedTitle+" | Total Selected: "+this.selUTXOs.length+" | Selected UTXOs: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats")):this.advancedTitle="Advanced Options"}onUTXOSelectionChange(t){const i={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((o,l)=>(i.value=o.value+l.value,i)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=0,this.fundingAmount=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.fundingAmount=this.flgUseAllBalance?this.totalSelectedUTXOAmount:null}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.flgMinConf&&!this.minConfValue||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;const t={peerId:this.peer&&this.peer.id?this.peer.id:this.selectedPubkey,satoshis:this.flgUseAllBalance?"all":this.fundingAmount.toString(),announce:!this.isPrivate,minconf:this.flgMinConf?this.minConfValue:null};t.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,this.selUTXOs.length&&this.selUTXOs.length>0&&(t.utxos=[],this.selUTXOs.forEach(i=>t.utxos.push(i.txid+":"+i.output))),this.store.dispatch((0,T.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(H.eX),e.Y36(u.JJ),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-open-channel"]],viewQuery:function(t,i){if(1&t&&e.Gf(qs,7),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first)}},decls:56,vars:34,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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","disabled","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"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-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"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxFlex","48","fxLayoutAlign","start end"],["tabindex","6","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","48","tabindex","7","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["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,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e.NdJ("click",function(){return i.onClose()}),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7,8),e.NdJ("submit",function(){return i.onOpenChannel()})("reset",function(){return i.resetData()}),e.TgZ(11,"div",9),e.YNc(12,Us,8,8,"mat-form-field",10),e.qZA(),e.YNc(13,Ns,1,0,"ng-container",11),e.TgZ(14,"div",9),e.TgZ(15,"div",12),e.TgZ(16,"mat-form-field",13),e.TgZ(17,"input",14,15),e.NdJ("ngModelChange",function(l){return i.fundingAmount=l}),e.qZA(),e.TgZ(19,"mat-hint"),e._uU(20),e.ALo(21,"number"),e.qZA(),e.TgZ(22,"span",16),e._uU(23," Sats "),e.qZA(),e.YNc(24,ks,2,0,"mat-error",17),e.YNc(25,Is,2,1,"mat-error",17),e.qZA(),e.TgZ(26,"div",18),e.TgZ(27,"mat-slide-toggle",19),e.NdJ("ngModelChange",function(l){return i.isPrivate=l}),e._uU(28,"Private Channel"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(29,"mat-expansion-panel",20),e.NdJ("closed",function(){return i.onAdvancedPanelToggle(!0)})("opened",function(){return i.onAdvancedPanelToggle(!1)}),e.TgZ(30,"mat-expansion-panel-header"),e.TgZ(31,"mat-panel-title"),e.TgZ(32,"span"),e._uU(33),e.qZA(),e.qZA(),e.qZA(),e.TgZ(34,"div",21),e.TgZ(35,"div",22),e.TgZ(36,"div",23),e.TgZ(37,"mat-form-field",24),e.TgZ(38,"mat-select",25),e.NdJ("valueChange",function(l){return i.selFeeRate=l})("selectionChange",function(){return i.customFeeRate=null}),e.YNc(39,Ms,2,2,"mat-option",26),e.qZA(),e.qZA(),e.YNc(40,Ds,4,5,"mat-form-field",27),e.qZA(),e.TgZ(41,"div",28),e.TgZ(42,"mat-checkbox",29),e.NdJ("ngModelChange",function(l){return i.flgMinConf=l})("change",function(){return i.flgMinConf?i.selFeeRate=null:i.minConfValue=null}),e.qZA(),e.TgZ(43,"mat-form-field",30),e.TgZ(44,"input",31,32),e.NdJ("ngModelChange",function(l){return i.minConfValue=l}),e.qZA(),e.YNc(46,Ps,2,0,"mat-error",17),e.qZA(),e.qZA(),e.qZA(),e.YNc(47,Qs,9,8,"div",33),e.qZA(),e.qZA(),e.qZA(),e.YNc(48,Bs,3,2,"div",34),e.TgZ(49,"div",35),e.TgZ(50,"button",36),e._uU(51,"Clear Fields"),e.qZA(),e.TgZ(52,"button",37),e._uU(53,"Open Channel"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(54,Vs,1,1,"ng-template",null,38,e.W1O)),2&t){const o=e.MAs(18),l=e.MAs(55);e.xp6(5),e.Oqu(i.alertTitle),e.xp6(7),e.Q6J("ngIf",!i.peer&&i.peers&&i.peers.length>0),e.xp6(1),e.Q6J("ngTemplateOutlet",l),e.xp6(4),e.Q6J("ngModel",i.fundingAmount)("step",1e3)("min",1)("max",i.totalBalance)("disabled",i.flgUseAllBalance),e.xp6(3),e.AsE("Remaining Bal: ",e.lcZ(21,29,i.totalBalance-(i.fundingAmount?i.fundingAmount:0)),"",i.flgUseAllBalance?". Amount replaced by UTXO balance":"",""),e.xp6(4),e.Q6J("ngIf",(null==o.errors?null:o.errors.required)||!i.fundingAmount),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.max),e.xp6(2),e.Q6J("ngModel",i.isPrivate),e.xp6(6),e.Oqu(i.advancedTitle),e.xp6(4),e.Q6J("fxFlex","customperkb"!==i.selFeeRate||i.flgMinConf?"100":"48"),e.xp6(1),e.Q6J("value",i.selFeeRate)("disabled",i.flgMinConf),e.xp6(1),e.Q6J("ngForOf",i.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===i.selFeeRate&&!i.flgMinConf),e.xp6(2),e.Q6J("ngModel",i.flgMinConf)("ngClass",e.WLB(31,zs,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM,i.screenSize===i.screenSizeEnum.MD||i.screenSize===i.screenSizeEnum.LG||i.screenSize===i.screenSizeEnum.XL)),e.xp6(2),e.Q6J("ngModel",i.minConfValue)("step",1)("min",0)("required",i.flgMinConf)("disabled",!i.flgMinConf),e.xp6(2),e.Q6J("ngIf",i.flgMinConf&&!i.minConfValue),e.xp6(1),e.Q6J("ngIf",i.isCompatibleVersion),e.xp6(1),e.Q6J("ngIf",""!==i.channelConnectionError)}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,Z.dn,c._Y,c.JL,c.F,u.O5,u.tP,g.KE,I.Nt,c.wV,c.qQ,c.Fd,c.Fj,X.q,ws.F,c.Q7,c.JJ,c.On,g.bx,g.R9,oe.Rr,ee.ib,ee.yz,ee.yK,R.gD,u.sg,le.oG,u.mk,q.oO,V.h,Ue.ZL,c.oH,Ue.XC,B.ey,g.TO,R.$L,Q.gM,N.BN,G.d],pipes:[u.JJ,u.Ov],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();function Gs(n,a){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Open"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.openChannels)}}function Xs(n,a){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Pending/Inactive"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.pendingChannels)}}let Ws=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.store=i,this.commonService=o,this.router=l,this.openChannels=0,this.pendingChannels=0,this.selNode={},this.information={},this.peers=[],this.utxos=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending/Inactive"}],this.activeLink=0,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(t=>t instanceof C.Av)).subscribe(t=>{this.activeLink=this.links.findIndex(i=>i.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(h.OL).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(h.Wi).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.peers=t.peers}),this.store.select(h.T4).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(i=>"confirmed"===i.status),"value")}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[4])).subscribe(t=>{this.openChannels=t.activeChannels.length||0,this.pendingChannels=t.pendingChannels.length+t.inactiveChannels.length||0,this.logger.info(t)})}onOpenChannel(){const t={peers:this.peers,information:this.information,balance:this.totalBalance,utxos:this.utxos,isCompatibleVersion:this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")};this.store.dispatch((0,L.qR)({payload:{data:{alertTitle:"Open Channel",message:t,component:Ne}}}))}onSelectedTabChange(t){this.router.navigateByUrl("/cl/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channels-tables"]],decls:12,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return i.onOpenChannel()}),e._uU(3,"Open Channel"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-tab-group",4),e.NdJ("selectedIndexChange",function(l){return i.activeLink=l})("selectedTabChange",function(l){return i.onSelectedTabChange(l)}),e.TgZ(6,"mat-tab"),e.YNc(7,Gs,2,1,"ng-template",5),e.qZA(),e.TgZ(8,"mat-tab"),e.YNc(9,Xs,2,1,"ng-template",5),e.qZA(),e.qZA(),e.TgZ(10,"div",6),e._UZ(11,"router-outlet"),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(5),e.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.yH,p.Wh,U.lW,k.SP,k.uX,k.uD,C.lC,fe.k],styles:[""]}),n})();function Ks(n,a){if(1&n&&(e.TgZ(0,"div"),e.TgZ(1,"div",9),e.TgZ(2,"div",1),e.TgZ(3,"h4",11),e._uU(4,"Funding Transaction Id"),e.qZA(),e.TgZ(5,"span",12),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e._UZ(7,"mat-divider",13),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(t.channel.funding_txid),e.xp6(1),e.Q6J("inset",!0)}}function $s(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Show Advanced"),e.qZA())}function js(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Hide Advanced"),e.qZA())}function el(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",23),e.NdJ("copied",function(o){return e.CHM(t),e.oxw().onCopyChanID(o)}),e._uU(1,"Copy Short Channel ID"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("payload",t.channel.short_channel_id)}}function tl(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(1,"OK"),e.qZA()}}const nl=function(n){return{"xs-scroll-y":n}},il=function(n,a){return{"mt-2":n,"mt-1":a}};let ke=(()=>{class n{constructor(t,i,o,l,d){this.dialogRef=t,this.data=i,this.logger=o,this.commonService=l,this.snackBar=d,this.faReceipt=x.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=s.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Short channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(F.mQ),e.Y36(O.v),e.Y36(j.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-information"]],decls:94,vars:40,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["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"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span",5),e._uU(6,"Channel Information"),e.qZA(),e.qZA(),e.TgZ(7,"button",6),e.NdJ("click",function(){return i.onClose()}),e._uU(8,"X"),e.qZA(),e.qZA(),e.TgZ(9,"mat-card-content",7),e.TgZ(10,"div",8),e.TgZ(11,"div",9),e.TgZ(12,"div",10),e.TgZ(13,"h4",11),e._uU(14,"Short Channel ID"),e.qZA(),e.TgZ(15,"span",12),e._uU(16),e.qZA(),e.qZA(),e.TgZ(17,"div",10),e.TgZ(18,"h4",11),e._uU(19,"Peer Alias"),e.qZA(),e.TgZ(20,"span",12),e._uU(21),e.qZA(),e.qZA(),e.qZA(),e._UZ(22,"mat-divider",13),e.TgZ(23,"div",9),e.TgZ(24,"div",1),e.TgZ(25,"h4",11),e._uU(26,"Channel ID"),e.qZA(),e.TgZ(27,"span",12),e._uU(28),e.qZA(),e.qZA(),e.qZA(),e._UZ(29,"mat-divider",13),e.TgZ(30,"div",9),e.TgZ(31,"div",1),e.TgZ(32,"h4",11),e._uU(33,"Peer Public Key"),e.qZA(),e.TgZ(34,"span",12),e._uU(35),e.qZA(),e.qZA(),e.qZA(),e._UZ(36,"mat-divider",13),e.TgZ(37,"div",9),e.TgZ(38,"div",14),e.TgZ(39,"h4",11),e._uU(40,"mSatoshi to Us"),e.qZA(),e.TgZ(41,"span",15),e._uU(42),e.ALo(43,"number"),e.qZA(),e.qZA(),e.TgZ(44,"div",14),e.TgZ(45,"h4",11),e._uU(46,"Spendable (mSats)"),e.qZA(),e.TgZ(47,"span",15),e._uU(48),e.ALo(49,"number"),e.qZA(),e.qZA(),e.TgZ(50,"div",14),e.TgZ(51,"h4",11),e._uU(52,"Total (mSats)"),e.qZA(),e.TgZ(53,"span",15),e._uU(54),e.ALo(55,"number"),e.qZA(),e.qZA(),e.TgZ(56,"div",14),e.TgZ(57,"h4",11),e._uU(58,"State"),e.qZA(),e.TgZ(59,"span",15),e._uU(60),e.qZA(),e.qZA(),e.qZA(),e._UZ(61,"mat-divider",13),e.TgZ(62,"div",9),e.TgZ(63,"div",14),e.TgZ(64,"h4",11),e._uU(65,"Our Reserve (Sats)"),e.qZA(),e.TgZ(66,"span",15),e._uU(67),e.ALo(68,"number"),e.qZA(),e.qZA(),e.TgZ(69,"div",14),e.TgZ(70,"h4",11),e._uU(71,"Their Reserve (Sats)"),e.qZA(),e.TgZ(72,"span",15),e._uU(73),e.ALo(74,"number"),e.qZA(),e.qZA(),e.TgZ(75,"div",14),e.TgZ(76,"h4",11),e._uU(77,"Connected"),e.qZA(),e.TgZ(78,"span",15),e._uU(79),e.qZA(),e.qZA(),e.TgZ(80,"div",14),e.TgZ(81,"h4",11),e._uU(82,"Private"),e.qZA(),e.TgZ(83,"span",15),e._uU(84),e.qZA(),e.qZA(),e.qZA(),e._UZ(85,"mat-divider",13),e.YNc(86,Ks,8,2,"div",16),e.TgZ(87,"div",17),e.TgZ(88,"button",18),e.NdJ("click",function(){return i.onShowAdvanced()}),e.YNc(89,$s,2,0,"p",19),e.YNc(90,js,2,0,"ng-template",null,20,e.W1O),e.qZA(),e.YNc(92,el,2,1,"button",21),e.YNc(93,tl,2,0,"button",22),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t){const o=e.MAs(91);e.xp6(4),e.Q6J("icon",i.faReceipt),e.xp6(5),e.Q6J("ngClass",e.VKq(35,nl,i.screenSize===i.screenSizeEnum.XS)),e.xp6(7),e.Oqu(i.channel.short_channel_id),e.xp6(5),e.Oqu(i.channel.alias),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(i.channel.channel_id),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(i.channel.id),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(43,25,i.channel.msatoshi_to_us)),e.xp6(6),e.Oqu(e.lcZ(49,27,i.channel.spendable_msatoshi)),e.xp6(6),e.Oqu(e.lcZ(55,29,i.channel.msatoshi_total)),e.xp6(6),e.Oqu(i.channel.state),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(68,31,i.channel.our_channel_reserve_satoshis)),e.xp6(6),e.Oqu(e.lcZ(74,33,i.channel.their_channel_reserve_satoshis)),e.xp6(6),e.Oqu(i.channel.connected?"Yes":"No"),e.xp6(5),e.Oqu(i.channel.private?"Yes":"No"),e.xp6(1),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngIf",i.showAdvanced),e.xp6(1),e.Q6J("ngClass",e.WLB(37,il,!i.showAdvanced,i.showAdvanced)),e.xp6(2),e.Q6J("ngIf",!i.showAdvanced)("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",i.showCopy),e.xp6(1),e.Q6J("ngIf",!i.showCopy)}},directives:[p.xw,p.Wh,p.yH,Z.dk,N.BN,U.lW,Z.dn,u.mk,q.oO,G.d,u.O5,V.h,te.y],pipes:[u.JJ],styles:[""]}),n})();function al(n,a){1&n&&e._UZ(0,"mat-progress-bar",33)}function ol(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Short Channel ID "),e.qZA())}function sl(n,a){if(1&n&&(e.TgZ(0,"span",40),e._UZ(1,"fa-icon",41),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEyeSlash)}}function ll(n,a){if(1&n&&(e.TgZ(0,"span",42),e._UZ(1,"fa-icon",41),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEye)}}const Ie=function(n){return{"max-width":n}};function rl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"div",36),e.YNc(2,sl,2,1,"span",37),e.YNc(3,ll,2,1,"span",38),e.TgZ(4,"span",39),e._uU(5),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(4,Ie,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),e.xp6(1),e.Q6J("ngIf",t.private),e.xp6(1),e.Q6J("ngIf",!t.private),e.xp6(2),e.Oqu(null==t?null:t.short_channel_id)}}function cl(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Alias "),e.qZA())}function ul(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"div",36),e.TgZ(2,"span",39),e._uU(3),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(2,Ie,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),e.xp6(2),e.Oqu(null==t?null:t.alias)}}function pl(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Connected "),e.qZA())}function ml(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function dl(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Private "),e.qZA())}function fl(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function _l(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," State "),e.qZA())}function hl(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.state,"")}}function gl(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Local Balance (Sats) "),e.qZA())}function Cl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,(null==t?null:t.msatoshi_to_us)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function xl(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Remote Balance (Sats) "),e.qZA())}function Tl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,(null==t?null:t.msatoshi_to_them)/1e3,(null==t?null:t.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function yl(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Total mSatoshis "),e.qZA())}function Zl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.msatoshi_total)," ")}}function Al(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Spendable Satoshi "),e.qZA())}function Ll(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function vl(n,a){1&n&&(e.TgZ(0,"th",45),e._uU(1,"Balance Score "),e.qZA())}function bl(n,a){if(1&n&&(e.TgZ(0,"td",46),e.TgZ(1,"div",47),e.TgZ(2,"mat-hint",48),e._uU(3),e.ALo(4,"number"),e.qZA(),e.qZA(),e._UZ(5,"mat-progress-bar",49),e.qZA()),2&n){const t=a.$implicit;e.xp6(3),e.Oqu(e.lcZ(4,2,t.balancedness||0)),e.xp6(2),e.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function Sl(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",50),e.TgZ(1,"div",51),e.TgZ(2,"mat-select",52),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",53),e.NdJ("click",function(){return e.CHM(t),e.oxw().onChannelUpdate("all")}),e._uU(5,"Update Fee Policy"),e.qZA(),e.TgZ(6,"mat-option",53),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(7,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function wl(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",54),e.TgZ(1,"div",55),e.TgZ(2,"mat-select",56),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",53),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onChannelClick(d,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",53),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onViewRemotePolicy(l)}),e._uU(7,"View Remote Fee"),e.qZA(),e.TgZ(8,"mat-option",53),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onChannelUpdate(l)}),e._uU(9,"Update Fee Policy"),e.qZA(),e.TgZ(10,"mat-option",53),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onChannelClose(l)}),e._uU(11,"Close Channel"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function ql(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No peers connected. Add a peer in order to open a channel."),e.qZA())}function Fl(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No channel available."),e.qZA())}function Ol(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting channels..."),e.qZA())}function Rl(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Ul(n,a){if(1&n&&(e.TgZ(0,"td",57),e.YNc(1,ql,2,0,"p",58),e.YNc(2,Fl,2,0,"p",58),e.YNc(3,Ol,2,0,"p",58),e.YNc(4,Rl,2,1,"p",58),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Nl=function(n){return{"display-none":n}};function kl(n,a){if(1&n&&e._UZ(0,"tr",59),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Nl,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Il(n,a){1&n&&e._UZ(0,"tr",60)}function Ml(n,a){1&n&&e._UZ(0,"tr",61)}const El=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Dl=function(){return["no_peer"]};let Pl=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.store=i,this.rtlEffects=o,this.clEffects=l,this.commonService=d,this.faEye=x.Mdf,this.faEyeSlash=x.Aq,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=s.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi_to_us","msatoshi_to_them","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","actions"]):(this.flgSticky=!0,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","balancedness","actions"])}ngOnInit(){this.store.select(h.jK).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=t.activeChannels,this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){this.store.dispatch((0,T.$A)({payload:{uiMessage:s.m6.GET_REMOTE_POLICY,shortChannelID:t.short_channel_id,showError:!0}})),this.clEffects.setLookupCL.pipe((0,z.q)(1)).subscribe(i=>{if(0===i.length)return!1;let o={};o=i[0].source!==this.information.id?i[0]:i[1];const l=[[{key:"base_fee_millisatoshi",value:o.base_fee_millisatoshi,title:"Base Fees (mSats)",width:34,type:s.Gi.NUMBER},{key:"fee_per_millionth",value:o.fee_per_millionth,title:"Fee/Millionth",width:33,type:s.Gi.NUMBER},{key:"delay",value:o.delay,title:"Delay",width:33,type:s.Gi.NUMBER}]],d="Remote policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id);setTimeout(()=>{this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Remote Channel Policy",titleMessage:d,message:l}}}))},0)})}onChannelUpdate(t){"all"!==t&&"ONCHAIN"===t.state||("all"===t?(this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:1,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[1])).subscribe(o=>{o&&this.store.dispatch((0,T.pW)({payload:{baseFeeMsat:o[0].inputValue,feeRate:o[1].inputValue,channelId:"all"}}))})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0},this.store.dispatch((0,T.$A)({payload:{uiMessage:s.m6.GET_CHAN_POLICY,shortChannelID:t.short_channel_id,showError:!1}})),this.clEffects.setLookupCL.pipe((0,z.q)(1)).subscribe(i=>{this.myChanPolicy=i.length>0&&i[0].source===this.information.id?{fee_base_msat:i[0].base_fee_millisatoshi,fee_rate_milli_msat:i[0].fee_per_millionth}:i.length>1&&i[1].source===this.information.id?{fee_base_msat:i[1].base_fee_millisatoshi,fee_rate_milli_msat:i[1].fee_per_millionth}:{fee_base_msat:0,fee_rate_milli_msat:0},this.logger.info(this.myChanPolicy);const o="Update fee policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),l=[];setTimeout(()=>{this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:l,titleMessage:o,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:48,hintFunction:this.percentHintFunction}]}}}))},0)}),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[2])).subscribe(i=>{i&&this.store.dispatch((0,T.pW)({payload:{baseFeeMsat:i[0].inputValue,feeRate:i[1].inputValue,channelId:t.channel_id}}))})),this.applyFilter())}percentHintFunction(t){return(t/1e4).toString()+"%"}onChannelClose(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Close Channel",titleMessage:"Closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[3])).subscribe(i=>{i&&this.store.dispatch((0,T.BL)({payload:{id:t.id,channelId:t.channel_id,force:!1}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{channel:t,showCopy:!0,component:ke}}}))}loadChannelsTable(t){t.sort((i,o)=>i.active===o.active?0:o.active?1:-1),this.channels=new r.by([...t]),this.channels.filterPredicate=(i,o)=>((i.connected?"connected":"disconnected")+(i.channel_id?i.channel_id.toLowerCase():"")+(i.short_channel_id?i.short_channel_id.toLowerCase():"")+(i.id?i.id.toLowerCase():"")+(i.alias?i.alias.toLowerCase():"")+(i.private?"private":"public")+(i.state?i.state.toLowerCase():"")+(i.funding_txid?i.funding_txid.toLowerCase():"")+(i.msatoshi_to_us?i.msatoshi_to_us:"")+(i.msatoshi_total?i.msatoshi_total:"")+(i.their_channel_reserve_satoshis?i.their_channel_reserve_satoshis:"")+(i.our_channel_reserve_satoshis?i.our_channel_reserve_satoshis:"")+(i.spendable_msatoshi?i.spendable_msatoshi:"")).includes(o),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.channels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(W.V),e.Y36(re.s),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-open-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Channels")}])],decls:48,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_to_them"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["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-1",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"],["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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"input",4),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.YNc(5,al,1,0,"mat-progress-bar",5),e.TgZ(6,"div",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,ol,2,0,"th",10),e.YNc(11,rl,6,6,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,cl,2,0,"th",10),e.YNc(14,ul,4,4,"td",11),e.BQk(),e.ynx(15,13),e.YNc(16,pl,2,0,"th",10),e.YNc(17,ml,2,1,"td",11),e.BQk(),e.ynx(18,14),e.YNc(19,dl,2,0,"th",10),e.YNc(20,fl,2,1,"td",11),e.BQk(),e.ynx(21,15),e.YNc(22,_l,2,0,"th",10),e.YNc(23,hl,2,1,"td",11),e.BQk(),e.ynx(24,16),e.YNc(25,gl,2,0,"th",17),e.YNc(26,Cl,4,4,"td",11),e.BQk(),e.ynx(27,18),e.YNc(28,xl,2,0,"th",17),e.YNc(29,Tl,4,4,"td",11),e.BQk(),e.ynx(30,19),e.YNc(31,yl,2,0,"th",17),e.YNc(32,Zl,4,3,"td",11),e.BQk(),e.ynx(33,20),e.YNc(34,Al,2,0,"th",17),e.YNc(35,Ll,4,3,"td",11),e.BQk(),e.ynx(36,21),e.YNc(37,vl,2,0,"th",22),e.YNc(38,bl,6,4,"td",23),e.BQk(),e.ynx(39,24),e.YNc(40,Sl,8,0,"th",25),e.YNc(41,wl,12,0,"td",26),e.BQk(),e.ynx(42,27),e.YNc(43,Ul,5,4,"td",28),e.BQk(),e.YNc(44,kl,1,3,"tr",29),e.YNc(45,Il,1,0,"tr",30),e.YNc(46,Ml,1,0,"tr",31),e.qZA(),e.qZA(),e._UZ(47,"mat-paginator",32),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(1),e.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),e.xp6(2),e.Q6J("dataSource",i.channels)("ngClass",e.VKq(11,El,""!==i.errorMessage)),e.xp6(37),e.Q6J("matFooterRowDef",e.DdM(13,Dl)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,u.O5,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,N.BN,g.bx,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-short_channel_id[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_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-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();const Jl=["outputIdx"];function Ql(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Output Index required."),e.qZA())}function Yl(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid index value."),e.qZA())}function Bl(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function Hl(n,a){if(1&n&&(e.TgZ(0,"div",27),e._UZ(1,"fa-icon",13),e.TgZ(2,"span"),e._uU(3),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.bumpFeeError)}}let Vl=(()=>{class n{constructor(t,i,o,l,d,v){this.actions=t,this.dialogRef=i,this.data=o,this.store=l,this.logger=d,this.snackBar=v,this.newAddress="",this.fees=null,this.outputIndex=null,this.faCopy=x.kZ_,this.faInfoCircle=x.sqG,this.faExclamationTriangle=x.eHv,this.bumpFeeError="",this.unSubs=[new m.x,new m.x]}set payReq(t){t&&(this.outputIdx=t)}ngOnInit(){this.bumpFeeChannel=this.data.channel}onBumpFee(){if(!this.outputIndex&&0!==this.outputIndex||!this.fees)return!0;this.bumpFeeError="",this.store.dispatch((0,T._E)({payload:s._t[0]})),this.actions.pipe((0,D.h)(t=>t.type===s.sW.SET_NEW_ADDRESS_CL),(0,z.q)(1)).subscribe(t=>{this.store.dispatch((0,T.Wi)({payload:{address:t.payload,satoshis:"all",feeRate:this.fees,utxos:[this.bumpFeeChannel.funding_txid+":"+this.outputIndex.toString()]}}))}),this.actions.pipe((0,D.h)(t=>t.type===s.sW.SET_CHANNEL_TRANSACTION_RES_CL),(0,z.q)(1)).subscribe(t=>{this.store.dispatch((0,L.jW)({payload:"Successfully bumped the fee. Use the block explorer to verify transaction."})),this.dialogRef.close()}),this.actions.pipe((0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL),(0,f.R)(this.unSubs[0])).subscribe(t=>{t.payload.status===s.Bn.ERROR&&("SetChannelTransaction"===t.payload.action||"GenerateNewAddress"===t.payload.action)&&(this.logger.error(t.payload.message),this.bumpFeeError=t.payload.message)})}onCopyID(t){this.snackBar.open("Transaction ID copied.")}resetData(){this.bumpFeeError="",this.fees=null,this.outputIndex=null,this.outputIdx.control.setErrors(null)}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(H.eX),e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(F.mQ),e.Y36(j.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-bump-fee"]],viewQuery:function(t,i){if(1&t&&e.Gf(Jl,5),2&t){let o;e.iGM(o=e.CRH())&&(i.payReq=o.first)}},decls:47,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["matSuffix","","rtlClipboard","","matTooltip","Copy transaction ID",1,"ml-1",3,"icon","payload","copied"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],[1,"pl-1"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","49"],["autoFocus","","matInput","","placeholder","Output Index","type","number","tabindex","1","required","","name","outputIdx",3,"ngModel","step","min","ngModelChange"],["outputIdx","ngModel"],[4,"ngIf"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","fees","required","","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","tabindex","5","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","6",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Bump Fee"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e.NdJ("click",function(){return i.onClose()}),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7),e.TgZ(10,"div",8),e.TgZ(11,"p",9),e._uU(12),e.TgZ(13,"fa-icon",10),e.NdJ("copied",function(l){return i.onCopyID(l)}),e.qZA(),e.qZA(),e.TgZ(14,"div",11),e.TgZ(15,"div",12),e._UZ(16,"fa-icon",13),e.TgZ(17,"span",14),e._uU(18,"Bumping fee on pending open channels is an advanced feature, attempt it only if you are familiar with the functionality of Bitcoin transactions. "),e.TgZ(19,"div"),e._uU(20,"Before attempting fee bump ensure the following:"),e.qZA(),e.TgZ(21,"div",15),e._uU(22,"1: Use a Bitcoin block explorer to ensure that channel opening transaction is not confirmed."),e.qZA(),e.TgZ(23,"div",15),e._uU(24,"2: The channel opening transaction must have a sizable change output, which can be spent further. The fee cannot be bumped without the change output."),e.qZA(),e.TgZ(25,"div",15),e._uU(26,"3: Find the index value of the change output via a block explorer."),e.qZA(),e.TgZ(27,"div",15),e._uU(28,"4: Enter the index value of the change output in the form below and the desired fee rate."),e.qZA(),e.TgZ(29,"div",15),e._uU(30,"5: Upon successful fee bump, use your block explorer to track the child transaction in the mempool, which should be linked with the change output transaction."),e.qZA(),e.qZA(),e.qZA(),e.TgZ(31,"div",16),e.TgZ(32,"mat-form-field",17),e.TgZ(33,"input",18,19),e.NdJ("ngModelChange",function(l){return i.outputIndex=l}),e.qZA(),e.YNc(35,Ql,2,0,"mat-error",20),e.YNc(36,Yl,2,0,"mat-error",20),e.qZA(),e.TgZ(37,"mat-form-field",17),e.TgZ(38,"input",21,22),e.NdJ("ngModelChange",function(l){return i.fees=l}),e.qZA(),e.YNc(40,Bl,2,0,"mat-error",20),e.qZA(),e.qZA(),e.YNc(41,Hl,4,2,"div",23),e.qZA(),e.qZA(),e.TgZ(42,"div",24),e.TgZ(43,"button",25),e.NdJ("click",function(){return i.resetData()}),e._uU(44,"Clear"),e.qZA(),e.TgZ(45,"button",26),e.NdJ("click",function(){return i.onBumpFee()}),e._uU(46),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t){const o=e.MAs(34);e.xp6(12),e.hij("Bump fee for transaction id: ",null==i.bumpFeeChannel?null:i.bumpFeeChannel.funding_txid," "),e.xp6(1),e.Q6J("icon",i.faCopy)("payload",null==i.bumpFeeChannel?null:i.bumpFeeChannel.funding_txid),e.xp6(3),e.Q6J("icon",i.faInfoCircle),e.xp6(17),e.Q6J("ngModel",i.outputIndex)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",null==o.errors?null:o.errors.required),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.pendingChannelOutputIndex),e.xp6(2),e.Q6J("ngModel",i.fees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!i.fees),e.xp6(1),e.Q6J("ngIf",""!==i.bumpFeeError),e.xp6(5),e.Oqu(""!==i.bumpFeeError?"Retry Bump Fee":"Bump Fee")}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,Z.dn,c._Y,c.JL,c.F,N.BN,g.R9,te.y,Q.gM,g.KE,I.Nt,c.wV,c.qQ,c.Fj,X.q,V.h,c.Q7,c.JJ,c.On,u.O5,g.TO],styles:[""]}),n})();function zl(n,a){1&n&&e._UZ(0,"mat-progress-bar",30)}function Gl(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Short Channel ID "),e.qZA())}function Xl(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.short_channel_id,"")}}function Wl(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Alias "),e.qZA())}function Kl(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.alias)}}function $l(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Connected "),e.qZA())}function jl(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function er(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Private "),e.qZA())}function tr(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function nr(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," State "),e.qZA())}const ir=function(n){return{"max-width":n}};function ar(n,a){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(2,ir,i.screenSize===i.screenSizeEnum.XS?"10rem":"")),e.xp6(1),e.hij(" ",i.CLChannelPendingState[null==t?null:t.state]," ")}}function or(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," mSatoshi To Us "),e.qZA())}function sr(n,a){if(1&n&&(e.TgZ(0,"td",32),e.TgZ(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.msatoshi_to_us)," ")}}function lr(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Total (Sats) "),e.qZA())}function rr(n,a){if(1&n&&(e.TgZ(0,"td",32),e.TgZ(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,(null==t?null:t.msatoshi_total)/1e3)," ")}}function cr(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Spendable Satoshi "),e.qZA())}function ur(n,a){if(1&n&&(e.TgZ(0,"td",32),e.TgZ(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function pr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",36),e.TgZ(1,"div",37),e.TgZ(2,"mat-select",38),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function mr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",39),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onChannelClose(o)}),e._uU(1,"Close Channel"),e.qZA()}}function dr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",39),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onBumpFee(o)}),e._uU(1,"Bump Fee"),e.qZA()}}function fr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",40),e.TgZ(1,"div",37),e.TgZ(2,"mat-select",41),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onChannelClick(d,o)}),e._uU(5,"View Info"),e.qZA(),e.YNc(6,mr,2,0,"mat-option",42),e.YNc(7,dr,2,0,"mat-option",42),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.xp6(6),e.Q6J("ngIf",i.isCompatibleVersion&&("CHANNELD_SHUTTING_DOWN"===t.state||"CLOSINGD_SIGEXCHANGE"===t.state||!t.connected&&"CHANNELD_NORMAL"===t.state)),e.xp6(1),e.Q6J("ngIf","CHANNELD_AWAITING_LOCKIN"===t.state)}}function _r(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No peers connected. Add a peer in order to open a channel."),e.qZA())}function hr(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending/inactive channel available."),e.qZA())}function gr(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending/inactive channels..."),e.qZA())}function Cr(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function xr(n,a){if(1&n&&(e.TgZ(0,"td",43),e.YNc(1,_r,2,0,"p",44),e.YNc(2,hr,2,0,"p",44),e.YNc(3,gr,2,0,"p",44),e.YNc(4,Cr,2,1,"p",44),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Tr=function(n){return{"display-none":n}};function yr(n,a){if(1&n&&e._UZ(0,"tr",45),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Tr,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Zr(n,a){1&n&&e._UZ(0,"tr",46)}function Ar(n,a){1&n&&e._UZ(0,"tr",47)}const Lr=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},vr=function(){return["no_peer"]};let br=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.store=i,this.rtlEffects=o,this.commonService=l,this.isCompatibleVersion=!1,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=s.vn,this.selFilter="",this.flgSticky=!1,this.CLChannelPendingState=s.uX,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","state","actions"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"])}ngOnInit(){this.store.select(h.jK).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.information.api_version&&(this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.api_version,"0.4.2")),this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=[...t.pendingChannels,...t.inactiveChannels],this.channelsData=this.channelsData.sort((i,o)=>this.CLChannelPendingState[i.state]>=this.CLChannelPendingState[o.state]?1:-1),this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onBumpFee(t){this.store.dispatch((0,L.qR)({payload:{data:{channel:t,component:Vl}}}))}onChannelClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{channel:t,showCopy:!0,component:ke}}}))}onChannelClose(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Force Close Channel",titleMessage:"Force closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Force Close"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[2])).subscribe(i=>{i&&this.store.dispatch((0,T.BL)({payload:{id:t.id,channelId:t.channel_id,force:!0}}))})}loadChannelsTable(t){t.sort((i,o)=>i.active===o.active?0:o.active?1:-1),this.channels=new r.by([...t]),this.channels.filterPredicate=(i,o)=>((i.connected?"connected":"disconnected")+(i.channel_id?i.channel_id.toLowerCase():"")+(i.short_channel_id?i.short_channel_id.toLowerCase():"")+(i.id?i.id.toLowerCase():"")+(i.alias?i.alias.toLowerCase():"")+(i.private?"private":"public")+(i.state&&this.CLChannelPendingState[i.state]?this.CLChannelPendingState[i.state].toLowerCase():"")+(i.funding_txid?i.funding_txid.toLowerCase():"")+(i.msatoshi_to_us?i.msatoshi_to_us:"")+(i.msatoshi_total?i.msatoshi_total:"")+(i.their_channel_reserve_satoshis?i.their_channel_reserve_satoshis:"")+(i.our_channel_reserve_satoshis?i.our_channel_reserve_satoshis:"")+(i.spendable_msatoshi?i.spendable_msatoshi:"")).includes(o),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(i,o)=>"state"===o?this.CLChannelPendingState[i.state]:i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]: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,"Pending-inactive-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(W.V),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-pending-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Channels")}])],decls:42,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pr-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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["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,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pr-3"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"input",4),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.YNc(5,zl,1,0,"mat-progress-bar",5),e.TgZ(6,"div",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,Gl,2,0,"th",10),e.YNc(11,Xl,2,1,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Wl,2,0,"th",10),e.YNc(14,Kl,2,1,"td",11),e.BQk(),e.ynx(15,13),e.YNc(16,$l,2,0,"th",10),e.YNc(17,jl,2,1,"td",11),e.BQk(),e.ynx(18,14),e.YNc(19,er,2,0,"th",10),e.YNc(20,tr,2,1,"td",11),e.BQk(),e.ynx(21,15),e.YNc(22,nr,2,0,"th",10),e.YNc(23,ar,2,4,"td",16),e.BQk(),e.ynx(24,17),e.YNc(25,or,2,0,"th",18),e.YNc(26,sr,4,3,"td",11),e.BQk(),e.ynx(27,19),e.YNc(28,lr,2,0,"th",18),e.YNc(29,rr,4,3,"td",11),e.BQk(),e.ynx(30,20),e.YNc(31,cr,2,0,"th",18),e.YNc(32,ur,4,3,"td",11),e.BQk(),e.ynx(33,21),e.YNc(34,pr,6,0,"th",22),e.YNc(35,fr,8,2,"td",23),e.BQk(),e.ynx(36,24),e.YNc(37,xr,5,4,"td",25),e.BQk(),e.YNc(38,yr,1,3,"tr",26),e.YNc(39,Zr,1,0,"tr",27),e.YNc(40,Ar,1,0,"tr",28),e.qZA(),e.qZA(),e._UZ(41,"mat-paginator",29),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(1),e.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),e.xp6(2),e.Q6J("dataSource",i.channels)("ngClass",e.VKq(11,Lr,""!==i.errorMessage)),e.xp6(31),e.Q6J("matFooterRowDef",e.DdM(13,vr)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,u.O5,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-state[_ngcontent-%COMP%]{flex:1 1 15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();const Sr=["peersForm"],wr=["stepper"];function qr(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.peerFormLabel)}}function Fr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Address is required."),e.qZA())}function Or(n,a){if(1&n&&(e.TgZ(0,"div",40),e._UZ(1,"fa-icon",41),e.TgZ(2,"span"),e._uU(3),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.peerConnectionError)}}function Rr(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.channelFormLabel)}}function Ur(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Nr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount must be a positive number."),e.qZA())}function kr(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function Ir(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function Mr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function Er(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",43),e._UZ(1,"input",44),e.YNc(2,Mr,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("step",.1)("min",0),e.xp6(1),e.Q6J("ngIf","customperkb"===t.channelFormGroup.controls.selFeeRate.value&&!t.channelFormGroup.controls.flgMinConf.value&&!t.channelFormGroup.controls.customFeeRate.value)}}function Dr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function Pr(n,a){if(1&n&&(e.TgZ(0,"div",40),e._UZ(1,"fa-icon",41),e.TgZ(2,"span"),e._uU(3),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.channelConnectionError)}}const Jr=function(n,a){return{"mr-6":n,"mr-2":a}};let Qr=(()=>{class n{constructor(t,i,o,l,d,v,J){this.dialogRef=t,this.data=i,this.store=o,this.formBuilder=l,this.actions=d,this.logger=v,this.commonService=J,this.faExclamationTriangle=x.eHv,this.peerAddress="",this.totalBalance=0,this.feeRateTypes=s.vn,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.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.id&&this.data.message.peer.netaddr?this.data.message.peer.id+"@"+this.data.message.peer.netaddr:this.data.message.peer&&this.data.message.peer.id&&!this.data.message.peer.netaddr?this.data.message.peer.id:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[c.kI.required]],peerAddress:[this.peerAddress,[c.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[c.kI.required,c.kI.min(1),c.kI.max(this.totalBalance)]],isPrivate:[!1],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}],hiddenAmount:["",[c.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.flgMinConf.valueChanges.pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{t?(this.channelFormGroup.controls.selFeeRate.setValue(null),this.channelFormGroup.controls.selFeeRate.disable(),this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.minConfValue.reset(),this.channelFormGroup.controls.minConfValue.enable(),this.channelFormGroup.controls.minConfValue.setValidators([c.kI.required])):(this.channelFormGroup.controls.selFeeRate.enable(),this.channelFormGroup.controls.minConfValue.setValue(null),this.channelFormGroup.controls.minConfValue.disable(),this.channelFormGroup.controls.minConfValue.setValidators(null))}),this.channelFormGroup.controls.selFeeRate.valueChanges.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.customFeeRate.reset(),this.channelFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.channelFormGroup.controls.flgMinConf.value?null:[c.kI.required])}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.NEWLY_ADDED_PEER_CL||t.type===s.sW.FETCH_CHANNELS_CL||t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.NEWLY_ADDED_PEER_CL&&(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===s.sW.FETCH_CHANNELS_CL&&this.dialogRef.close(),t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&("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((0,T.El)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||this.channelFormGroup.controls.flgMinConf.value&&!this.channelFormGroup.controls.minConfValue.value)return!0;this.channelConnectionError="",this.store.dispatch((0,T.YX)({payload:{peerId:this.newlyAddedPeer.id,satoshis:this.channelFormGroup.controls.fundingAmount.value,announce:!this.channelFormGroup.controls.isPrivate.value,feeRate:"customperkb"===this.channelFormGroup.controls.selFeeRate.value&&!this.channelFormGroup.controls.flgMinConf.value&&this.channelFormGroup.controls.customFeeRate.value?1e3*this.channelFormGroup.controls.customFeeRate.value+"perkb":this.channelFormGroup.controls.selFeeRate.value,minconf:this.channelFormGroup.controls.flgMinConf.value?this.channelFormGroup.controls.minConfValue.value:null}}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.selectedIndex){default: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.id):"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.id):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}t.selectedIndex{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(c.qu),e.Y36(H.eX),e.Y36(F.mQ),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-connect-peer"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Sr,5),e.Gf(wr,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.stepper=o.first)}},decls:57,vars:30,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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",""],["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-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","ngSubmit"],["matStepLabel","","disabled","true"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row","fxFlex","100","fxLayoutAlign.gt-sm","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","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["fxFlex","98"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["mat-button","","color","primary","tabindex","8","type","submit"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Connect to a new peer"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e.NdJ("click",function(){return i.onClose()}),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"div",7),e.TgZ(10,"mat-vertical-stepper",8,9),e.NdJ("selectionChange",function(l){return i.stepSelectionChanged(l)}),e.TgZ(12,"mat-step",10),e.TgZ(13,"form",11),e.YNc(14,qr,1,1,"ng-template",12),e.TgZ(15,"mat-form-field",1),e._UZ(16,"input",13),e.YNc(17,Fr,2,0,"mat-error",14),e.qZA(),e.YNc(18,Or,4,2,"div",15),e.TgZ(19,"div",16),e.TgZ(20,"button",17),e.NdJ("click",function(){return i.onConnectPeer()}),e._uU(21),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"mat-step",10),e.TgZ(23,"form",18),e.NdJ("ngSubmit",function(){return i.onOpenChannel()}),e.YNc(24,Rr,1,1,"ng-template",19),e.TgZ(25,"div",20),e.TgZ(26,"div",21),e.TgZ(27,"mat-form-field",22),e._UZ(28,"input",23),e.TgZ(29,"mat-hint"),e._uU(30),e.qZA(),e.TgZ(31,"span",24),e._uU(32," Sats "),e.qZA(),e.YNc(33,Ur,2,0,"mat-error",14),e.YNc(34,Nr,2,0,"mat-error",14),e.YNc(35,kr,2,1,"mat-error",14),e.qZA(),e.TgZ(36,"div",25),e.TgZ(37,"mat-slide-toggle",26),e._uU(38,"Private Channel"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(39,"div",27),e.TgZ(40,"div",28),e.TgZ(41,"mat-form-field",29),e.TgZ(42,"mat-select",30),e.YNc(43,Ir,2,2,"mat-option",31),e.qZA(),e.qZA(),e.YNc(44,Er,3,3,"mat-form-field",32),e.qZA(),e.TgZ(45,"div",33),e._UZ(46,"mat-checkbox",34),e.TgZ(47,"mat-form-field",35),e._UZ(48,"input",36),e.YNc(49,Dr,2,0,"mat-error",14),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(50,Pr,4,2,"div",15),e.TgZ(51,"div",16),e.TgZ(52,"button",37),e._uU(53),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(54,"div",38),e.TgZ(55,"button",39),e._uU(56),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(10),e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",i.peerFormGroup)("editable",i.flgEditable),e.xp6(1),e.Q6J("formGroup",i.peerFormGroup),e.xp6(4),e.Q6J("ngIf",null==i.peerFormGroup.controls.peerAddress.errors?null:i.peerFormGroup.controls.peerAddress.errors.required),e.xp6(1),e.Q6J("ngIf",""!==i.peerConnectionError),e.xp6(3),e.Oqu(""!==i.peerConnectionError?"Retry":"Add Peer"),e.xp6(1),e.Q6J("stepControl",i.channelFormGroup)("editable",i.flgEditable),e.xp6(1),e.Q6J("formGroup",i.channelFormGroup),e.xp6(5),e.Q6J("step",1e3),e.xp6(2),e.hij("Remaining Bal: ",i.totalBalance-(i.channelFormGroup.controls.fundingAmount.value?i.channelFormGroup.controls.fundingAmount.value:0),""),e.xp6(3),e.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.required),e.xp6(1),e.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.min),e.xp6(1),e.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.max),e.xp6(6),e.Q6J("fxFlex","customperkb"!==i.channelFormGroup.controls.selFeeRate.value||i.channelFormGroup.controls.flgMinConf.value?"100":"48"),e.xp6(2),e.Q6J("ngForOf",i.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===i.channelFormGroup.controls.selFeeRate.value&&!i.channelFormGroup.controls.flgMinConf.value),e.xp6(2),e.Q6J("ngClass",e.WLB(27,Jr,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM,i.screenSize===i.screenSizeEnum.MD||i.screenSize===i.screenSizeEnum.LG||i.screenSize===i.screenSizeEnum.XL)),e.xp6(2),e.Q6J("step",1)("min",0)("required",i.channelFormGroup.controls.flgMinConf.value),e.xp6(1),e.Q6J("ngIf",i.channelFormGroup.controls.flgMinConf.value&&!i.channelFormGroup.controls.minConfValue.value),e.xp6(1),e.Q6J("ngIf",""!==i.channelConnectionError),e.xp6(3),e.Oqu(""!==i.channelConnectionError?"Retry":"Open Channel"),e.xp6(2),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(null!=i.newlyAddedPeer&&i.newlyAddedPeer.id?"Do It Later":"Close"))},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,Z.dn,K.Vq,K.C0,c._Y,c.JL,c.sg,K.VY,g.KE,I.Nt,c.Fj,V.h,c.JJ,c.u,c.Q7,u.O5,c.wV,g.bx,g.R9,oe.Rr,R.gD,u.sg,le.oG,u.mk,q.oO,c.qQ,X.q,M.ZT,g.TO,N.BN,B.ey],styles:[""]}),n})();function Yr(n,a){1&n&&e._UZ(0,"mat-progress-bar",32)}function Br(n,a){1&n&&(e.TgZ(0,"th",33),e._uU(1," Alias "),e.qZA())}const Me=function(n){return{"mr-0":n}};function Hr(n,a){if(1&n&&e._UZ(0,"span",37),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Me,t.screenSize===t.screenSizeEnum.XS))}}function Vr(n,a){if(1&n&&e._UZ(0,"span",38),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Me,t.screenSize===t.screenSizeEnum.XS))}}const _e=function(n){return{"max-width":n}};function zr(n,a){if(1&n&&(e.TgZ(0,"td",34),e.YNc(1,Hr,1,3,"span",35),e.YNc(2,Vr,1,3,"span",36),e._uU(3),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(4,_e,i.screenSize===i.screenSizeEnum.XS?"10rem":"40rem")),e.xp6(1),e.Q6J("ngIf",null==t?null:t.connected),e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.connected)),e.xp6(1),e.hij(" ",null==t?null:t.alias," ")}}function Gr(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," ID "),e.qZA())}function Xr(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(2,_e,i.screenSize===i.screenSizeEnum.XS?"10rem":"40rem")),e.xp6(1),e.hij(" ",null==t?null:t.id," ")}}function Wr(n,a){1&n&&(e.TgZ(0,"th",33),e._uU(1," Network Address "),e.qZA())}function Kr(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,","),e._UZ(2,"br"),e.qZA())}function $r(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.YNc(2,Kr,3,0,"span",42),e.qZA()),2&n){const t=a.$implicit,i=a.last;e.xp6(1),e.Oqu(t),e.xp6(1),e.Q6J("ngIf",!i)}}function jr(n,a){if(1&n&&(e.TgZ(0,"td",34),e.YNc(1,$r,3,2,"span",41),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(2,_e,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),e.xp6(1),e.Q6J("ngForOf",null==t?null:t.netaddr)}}function ec(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",43),e.TgZ(1,"div",44),e.TgZ(2,"mat-select",45),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",46),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function tc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",46),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onPeerDetach(o)}),e._uU(1,"Disconnect"),e.qZA()}}function nc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",46),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onConnectPeer(o)}),e._uU(1,"Reconnect"),e.qZA()}}function ic(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",47),e.TgZ(1,"div",48),e.TgZ(2,"mat-select",45),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",46),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onPeerClick(d,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",46),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onOpenChannel(l)}),e._uU(7,"Open Channel"),e.qZA(),e.YNc(8,tc,2,0,"mat-option",49),e.YNc(9,nc,2,0,"mat-option",49),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit;e.xp6(8),e.Q6J("ngIf",t.connected),e.xp6(1),e.Q6J("ngIf",!t.connected)}}function ac(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No connected peer."),e.qZA())}function oc(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting peers..."),e.qZA())}function sc(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function lc(n,a){if(1&n&&(e.TgZ(0,"td",50),e.YNc(1,ac,2,0,"p",42),e.YNc(2,oc,2,0,"p",42),e.YNc(3,sc,2,1,"p",42),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const rc=function(n){return{"display-none":n}};function cc(n,a){if(1&n&&e._UZ(0,"tr",51),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,rc,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function uc(n,a){1&n&&e._UZ(0,"tr",52)}function pc(n,a){1&n&&e._UZ(0,"tr",53)}const mc=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},dc=function(){return["no_peer"]};let fc=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.store=i,this.rtlEffects=o,this.actions=l,this.commonService=d,this.faUsers=x.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","id","netaddr","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","id","netaddr","actions"])}ngOnInit(){this.store.select(h.Ao).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.availableBalance=t.balance.totalBalance||0}),this.store.select(h.Wi).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.peersData=t.peers||[],this.peersData.length>0&&this.loadPeersTable(this.peersData),this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.SET_PEERS_CL)).subscribe(t=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.id,message:[[{key:"id",value:t.id,title:"Public Key",width:100}],[{key:"netaddr",value:t.netaddr,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:50},{key:"connected",value:t.connected?"True":"False",title:"Connected",width:50}]]}}}))}onConnectPeer(t){this.store.dispatch((0,L.qR)({payload:{data:{message:{peer:t.id?t:null,information:this.information,balance:this.availableBalance},component:Qr}}}))}onOpenChannel(t){this.store.dispatch((0,L.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:Ne}}}))}onPeerDetach(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.id),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[3])).subscribe(o=>{o&&this.store.dispatch((0,T.z)({payload:{id:t.id,force:!1}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(t){this.peers=new r.by([...t]),this.peers.sortingDataAccessor=(i,o)=>{if("netaddr"===o){if(i.netaddr&&i.netaddr[0]){const l=i.netaddr[0].toString().split(".");return l[0]?+l[0]:i.netaddr[0]}return""}return i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null},this.peers.sort=this.sort,this.peers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(W.V),e.Y36(H.eX),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-peers"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Peers")}])],decls:36,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["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,"page-sub-title-container"],["fxFlex","30","fxFlex.gt-xs","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",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","",3,"ngStyle",4,"matCellDef"],["matColumnDef","id"],["mat-header-cell","","class","px-3","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","netaddr"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",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-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],[4,"ngFor","ngForOf"],[4,"ngIf"],["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"],["fxFlex","100","fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.TgZ(3,"button",3),e.NdJ("click",function(){return i.onConnectPeer({})}),e._uU(4,"Add Peer"),e.qZA(),e.qZA(),e.TgZ(5,"div",4),e.TgZ(6,"div",5),e.TgZ(7,"div",6),e._UZ(8,"fa-icon",7),e.TgZ(9,"span",8),e._uU(10,"Connected Peers"),e.qZA(),e.qZA(),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"div",10),e.TgZ(13,"input",11),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(14,"div",12),e.YNc(15,Yr,1,0,"mat-progress-bar",13),e.TgZ(16,"table",14,15),e.ynx(18,16),e.YNc(19,Br,2,0,"th",17),e.YNc(20,zr,4,6,"td",18),e.BQk(),e.ynx(21,19),e.YNc(22,Gr,2,0,"th",20),e.YNc(23,Xr,2,4,"td",21),e.BQk(),e.ynx(24,22),e.YNc(25,Wr,2,0,"th",17),e.YNc(26,jr,2,4,"td",18),e.BQk(),e.ynx(27,23),e.YNc(28,ec,6,0,"th",24),e.YNc(29,ic,10,2,"td",25),e.BQk(),e.ynx(30,26),e.YNc(31,lc,4,3,"td",27),e.BQk(),e.YNc(32,cc,1,3,"tr",28),e.YNc(33,uc,1,0,"tr",29),e.YNc(34,pc,1,0,"tr",30),e.qZA(),e.qZA(),e._UZ(35,"mat-paginator",31),e.qZA(),e.qZA()),2&t&&(e.xp6(8),e.Q6J("icon",i.faUsers),e.xp6(5),e.Q6J("ngModel",i.selFilter),e.xp6(2),e.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.peers)("ngClass",e.VKq(12,mc,""!==i.errorMessage)),e.xp6(16),e.Q6J("matFooterRowDef",e.DdM(14,dc)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,c._Y,c.JL,c.F,U.lW,N.BN,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,u.sg,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-id[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:2rem}.mat-column-netaddr[_ngcontent-%COMP%]{flex:1 1 25%;width:25%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const _c=["queryRoutesForm"];function hc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Destination pubkey is required."),e.qZA())}function gc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Cc(n,a){1&n&&e._UZ(0,"mat-progress-bar",38)}function xc(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," ID "),e.qZA())}function Tc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.id," ")}}function yc(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," Alias "),e.qZA())}function Zc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.alias," ")}}function Ac(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," Channel "),e.qZA())}function Lc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.channel," ")}}function vc(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," Direction "),e.qZA())}function bc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.direction," ")}}function Sc(n,a){1&n&&(e.TgZ(0,"th",41),e._uU(1," Delay "),e.qZA())}function wc(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.delay)," ")}}function qc(n,a){1&n&&(e.TgZ(0,"th",41),e._uU(1," Amount (Sats) "),e.qZA())}function Fc(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,(null==t?null:t.msatoshi)/1e3)," ")}}function Oc(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Amount mSat "),e.qZA())}function Rc(n,a){if(1&n&&(e.TgZ(0,"td",44),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.amount_msat," ")}}function Uc(n,a){1&n&&(e.TgZ(0,"th",45),e.TgZ(1,"span",42),e._uU(2,"Actions"),e.qZA(),e.qZA())}function Nc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",44),e.TgZ(1,"button",46),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onHopClick(d,o)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function kc(n,a){1&n&&e._UZ(0,"tr",47)}function Ic(n,a){1&n&&e._UZ(0,"tr",48)}const Mc=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};let Ec=(()=>{class n{constructor(t,i,o){this.store=t,this.clEffects=i,this.commonService=o,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=x.FpQ,this.faExclamationTriangle=x.eHv,this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi","actions"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","direction","msatoshi","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","direction","delay","msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","channel","direction","delay","msatoshi","actions"])}ngOnInit(){this.clEffects.setQueryRoutesCL.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.qrHops=new r.by([]),this.qrHops.data=[],t.routes&&t.routes.length&&t.routes.length>0?(this.flgLoading[0]=!1,this.qrHops=new r.by([...t.routes]),this.qrHops.data=t.routes):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.flgLoading[0]=!0,this.store.dispatch((0,T.WO)({payload:{destPubkey:this.destinationPubkey,amount:1e3*this.amount}}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"id",value:t.id,title:"ID",width:100,type:s.Gi.STRING}],[{key:"channel",value:t.channel,title:"Channel",width:50,type:s.Gi.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:s.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"mSatoshi",width:50,type:s.Gi.NUMBER},{key:"amount_msat",value:t.amount_msat,title:"Amount mSat",width:50,type:s.Gi.STRING}],[{key:"direction",value:t.direction,title:"Direction",width:50,type:s.Gi.STRING},{key:"delay",value:t.delay,title:"Delay",width:50,type:s.Gi.NUMBER}]]}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(re.s),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-query-routes"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(_c,7)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.form=o.first)}},decls:54,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 Pubkey","name","destinationPubkey","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-1"],["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,"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","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","channel"],["matColumnDef","direction"],["matColumnDef","delay"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","amount_msat"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"pl-4","pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.NdJ("ngSubmit",function(){return e.CHM(o),e.MAs(2).form.valid&&i.onQueryRoutes()}),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span"),e._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),e.qZA(),e.qZA(),e.TgZ(7,"mat-form-field",5),e.TgZ(8,"input",6,7),e.NdJ("ngModelChange",function(d){return i.destinationPubkey=d}),e.qZA(),e.YNc(10,hc,2,0,"mat-error",8),e.qZA(),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"input",10),e.NdJ("ngModelChange",function(d){return i.amount=d}),e.qZA(),e.YNc(13,gc,2,0,"mat-error",8),e.qZA(),e.TgZ(14,"div",11),e.TgZ(15,"button",12),e.NdJ("click",function(){return i.resetData()}),e._uU(16,"Clear"),e.qZA(),e.TgZ(17,"button",13),e._uU(18,"Query Route"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(19,"div",14),e.TgZ(20,"div",15),e._UZ(21,"fa-icon",16),e.TgZ(22,"span",17),e._uU(23,"Transaction Route"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(24,"div",18),e.YNc(25,Cc,1,0,"mat-progress-bar",19),e.TgZ(26,"table",20,21),e.ynx(28,22),e.YNc(29,xc,2,0,"th",23),e.YNc(30,Tc,2,1,"td",24),e.BQk(),e.ynx(31,25),e.YNc(32,yc,2,0,"th",23),e.YNc(33,Zc,2,1,"td",24),e.BQk(),e.ynx(34,26),e.YNc(35,Ac,2,0,"th",23),e.YNc(36,Lc,2,1,"td",24),e.BQk(),e.ynx(37,27),e.YNc(38,vc,2,0,"th",23),e.YNc(39,bc,2,1,"td",24),e.BQk(),e.ynx(40,28),e.YNc(41,Sc,2,0,"th",29),e.YNc(42,wc,4,3,"td",24),e.BQk(),e.ynx(43,30),e.YNc(44,qc,2,0,"th",29),e.YNc(45,Fc,4,3,"td",24),e.BQk(),e.ynx(46,31),e.YNc(47,Oc,2,0,"th",32),e.YNc(48,Rc,2,1,"td",33),e.BQk(),e.ynx(49,34),e.YNc(50,Uc,3,0,"th",35),e.YNc(51,Nc,3,0,"td",33),e.BQk(),e.YNc(52,kc,1,0,"tr",36),e.YNc(53,Ic,1,0,"tr",37),e.qZA(),e.qZA(),e.qZA()}2&t&&(e.xp6(4),e.Q6J("icon",i.faExclamationTriangle),e.xp6(4),e.Q6J("ngModel",i.destinationPubkey),e.xp6(2),e.Q6J("ngIf",!i.destinationPubkey),e.xp6(2),e.Q6J("ngModel",i.amount)("step",1e3)("min",0),e.xp6(1),e.Q6J("ngIf",!i.amount),e.xp6(8),e.Q6J("icon",i.faRoute),e.xp6(4),e.Q6J("ngIf",!0===i.flgLoading[0]),e.xp6(1),e.Q6J("dataSource",i.qrHops)("ngClass",e.VKq(14,Mc,"error"===i.flgLoading[0])),e.xp6(26),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns))},directives:[p.xw,p.yH,c._Y,c.JL,c.F,p.Wh,N.BN,g.KE,I.Nt,c.Fj,c.Q7,c.JJ,c.On,u.O5,c.wV,c.qQ,X.q,U.lW,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.as,r.nj,g.TO,P.pW,r.ge,y.nU,r.ev,r.XQ,r.Gk],pipes:[u.JJ],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}"]}),n})();var Ee=_(8020);function Dc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}let Pc=(()=>{class n{constructor(t,i,o){this.dataService=t,this.snackBar=i,this.logger=o,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new m.x,new m.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.zbase})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(Ee.D),e.Y36(j.ux),e.Y36(F.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"textarea",4),e.NdJ("ngModelChange",function(l){return i.message=l})("keyup",function(){return i.onMessageChange()}),e.qZA(),e.YNc(5,Dc,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"div",6),e.TgZ(7,"button",7),e.NdJ("click",function(){return i.resetData()}),e._uU(8,"Clear Field"),e.qZA(),e.TgZ(9,"button",8),e.NdJ("click",function(){return i.onSign()}),e._uU(10,"Sign"),e.qZA(),e.qZA(),e._UZ(11,"mat-divider",9),e.TgZ(12,"div",10),e.TgZ(13,"p"),e._uU(14,"Generated Signature"),e.qZA(),e.qZA(),e.TgZ(15,"div",11),e._uU(16),e.qZA(),e.TgZ(17,"div",12),e.TgZ(18,"button",13),e.NdJ("copied",function(l){return i.onCopyField(l)}),e._uU(19,"Copy Signature"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.message),e.xp6(1),e.Q6J("ngIf",!i.message),e.xp6(6),e.Q6J("inset",!0),e.xp6(5),e.Oqu(i.signature),e.xp6(2),e.Q6J("payload",i.signature))},directives:[p.xw,p.yH,p.Wh,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.Q7,c.JJ,c.On,u.O5,U.lW,G.d,te.y,g.TO],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Jc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}function Qc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Signature is required."),e.qZA())}function Yc(n,a){1&n&&(e.TgZ(0,"p",13),e.TgZ(1,"mat-icon",14),e._uU(2,"close"),e.qZA(),e._uU(3,"Verification failed, please double check message and signature"),e.qZA())}function Bc(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Pubkey Used"),e.qZA())}function Hc(n,a){if(1&n&&(e.TgZ(0,"div",20),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.Oqu(null==t.verifyRes?null:t.verifyRes.pubkey)}}function Vc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",21),e.TgZ(1,"button",22),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyField(o)}),e._uU(2,"Copy Pubkey"),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function zc(n,a){if(1&n&&(e.TgZ(0,"div",15),e._UZ(1,"mat-divider",16),e.TgZ(2,"div",17),e.YNc(3,Bc,2,0,"p",5),e.qZA(),e.YNc(4,Hc,3,1,"div",18),e.YNc(5,Vc,3,1,"div",19),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(2),e.Q6J("ngIf",t.verifyRes.verified),e.xp6(1),e.Q6J("ngIf",t.verifyRes.verified),e.xp6(1),e.Q6J("ngIf",t.verifyRes.verified)}}let Gc=(()=>{class n{constructor(t,i,o){this.dataService=t,this.snackBar=i,this.logger=o,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null},this.unSubs=[new m.x,new m.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){(this.verifiedMessage!==this.message||this.verifiedSignature!==this.signature)&&(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(Ee.D),e.Y36(j.ux),e.Y36(F.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"textarea",4),e.NdJ("ngModelChange",function(l){return i.message=l})("keyup",function(){return i.onChange()}),e.qZA(),e.YNc(5,Jc,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"mat-form-field",3),e.TgZ(7,"input",6,7),e.NdJ("ngModelChange",function(l){return i.signature=l})("keyup",function(){return i.onChange()}),e.qZA(),e.YNc(9,Qc,2,0,"mat-error",5),e.qZA(),e.YNc(10,Yc,4,0,"p",8),e.TgZ(11,"div",9),e.TgZ(12,"button",10),e.NdJ("click",function(){return i.resetData()}),e._uU(13,"Clear Fields"),e.qZA(),e.TgZ(14,"button",11),e.NdJ("click",function(){return i.onVerify()}),e._uU(15,"Verify"),e.qZA(),e.qZA(),e.YNc(16,zc,6,4,"div",12),e.qZA(),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.message),e.xp6(1),e.Q6J("ngIf",!i.message),e.xp6(2),e.Q6J("ngModel",i.signature),e.xp6(2),e.Q6J("ngIf",!i.signature),e.xp6(1),e.Q6J("ngIf",i.showVerifyStatus&&!i.verifyRes.verified),e.xp6(6),e.Q6J("ngIf",i.showVerifyStatus&&i.verifyRes.verified))},directives:[p.xw,p.yH,p.Wh,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.Q7,c.JJ,c.On,u.O5,U.lW,g.TO,pe.Hw,G.d,te.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Xc(n,a){if(1&n&&(e.TgZ(0,"div",5),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function Wc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e._UZ(1,"div",7),e.TgZ(2,"mat-form-field",8),e.TgZ(3,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().filterValue=o})("input",function(){return e.CHM(t),e.oxw().applyFilter()})("keyup",function(){return e.CHM(t),e.oxw().applyFilter()}),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.filterValue)}}function Kc(n,a){1&n&&e._UZ(0,"mat-progress-bar",33)}function $c(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Status"),e.qZA())}function jc(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.status)}}function eu(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Received Time"),e.qZA())}function tu(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/YYYY HH:mm"))}}function nu(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Resolved Time"),e.qZA())}function iu(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/YYYY HH:mm"))}}function au(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"In Channel"),e.qZA())}function ou(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.in_channel_alias)}}function su(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Out Channel"),e.qZA())}function lu(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.out_channel_alias)}}function ru(n,a){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Amount In (Sats)"),e.qZA())}function cu(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function uu(n,a){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Amount Out (Sats)"),e.qZA())}function pu(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function mu(n,a){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Fee (mSat)"),e.qZA())}function du(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==t?null:t.fee))}}function fu(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",38),e.TgZ(1,"div",39),e.TgZ(2,"mat-select",40),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",41),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function _u(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",42),e.TgZ(1,"button",43),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw(2).onForwardingEventClick(d,o)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function hu(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No forwarding history available."),e.qZA())}function gu(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting forwarding history..."),e.qZA())}function Cu(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function xu(n,a){if(1&n&&(e.TgZ(0,"td",44),e.YNc(1,hu,2,0,"p",45),e.YNc(2,gu,2,0,"p",45),e.YNc(3,Cu,2,1,"p",45),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Tu=function(n){return{"display-none":n}};function yu(n,a){if(1&n&&e._UZ(0,"tr",46),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Tu,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function Zu(n,a){1&n&&e._UZ(0,"tr",47)}function Au(n,a){1&n&&e._UZ(0,"tr",48)}const Lu=function(){return["no_event"]};function vu(n,a){if(1&n&&(e.TgZ(0,"div",10),e.YNc(1,Kc,1,0,"mat-progress-bar",11),e.TgZ(2,"table",12,13),e.ynx(4,14),e.YNc(5,$c,2,0,"th",15),e.YNc(6,jc,2,1,"td",16),e.BQk(),e.ynx(7,17),e.YNc(8,eu,2,0,"th",15),e.YNc(9,tu,3,4,"td",16),e.BQk(),e.ynx(10,18),e.YNc(11,nu,2,0,"th",15),e.YNc(12,iu,3,4,"td",16),e.BQk(),e.ynx(13,19),e.YNc(14,au,2,0,"th",15),e.YNc(15,ou,2,1,"td",16),e.BQk(),e.ynx(16,20),e.YNc(17,su,2,0,"th",15),e.YNc(18,lu,2,1,"td",16),e.BQk(),e.ynx(19,21),e.YNc(20,ru,2,0,"th",22),e.YNc(21,cu,4,4,"td",16),e.BQk(),e.ynx(22,23),e.YNc(23,uu,2,0,"th",22),e.YNc(24,pu,4,4,"td",16),e.BQk(),e.ynx(25,24),e.YNc(26,mu,2,0,"th",22),e.YNc(27,du,4,3,"td",16),e.BQk(),e.ynx(28,25),e.YNc(29,fu,6,0,"th",26),e.YNc(30,_u,3,0,"td",27),e.BQk(),e.ynx(31,28),e.YNc(32,xu,4,3,"td",29),e.BQk(),e.YNc(33,yu,1,3,"tr",30),e.YNc(34,Zu,1,0,"tr",31),e.YNc(35,Au,1,0,"tr",32),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.forwardingHistoryEvents),e.xp6(31),e.Q6J("matFooterRowDef",e.DdM(6,Lu)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function bu(n,a){if(1&n&&e._UZ(0,"mat-paginator",49),2&n){const t=e.oxw();e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let De=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.commonService=i,this.store=o,this.datePipe=l,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["in_msatoshi","out_msatoshi","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.successfulEvents=t.forwardingHistory||[],this.successfulEvents.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:s.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,t.eventsData.firstChange||this.loadForwardingEventsTable(this.successfulEvents)),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:s.Gi.STRING}],[{key:"status",value:"Settled",title:"Status",width:50,type:s.Gi.STRING},{key:"fee",value:t.fee,title:"Fee (mSats)",width:50,type:s.Gi.NUMBER}],[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:s.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:s.Gi.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:s.Gi.STRING},{key:"out_channel",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:s.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:s.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Out (mSats)",width:50,type:s.Gi.NUMBER}]]}}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new r.by([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.forwardingHistoryEvents.paginator=this.paginator,this.forwardingHistoryEvents.filterPredicate=(i,o)=>((i.received_time?this.datePipe.transform(new Date(1e3*i.received_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.resolved_time?this.datePipe.transform(new Date(1e3*i.resolved_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.in_channel?i.in_channel.toLowerCase():"")+(i.out_channel?i.out_channel.toLowerCase():"")+(i.in_msatoshi?i.in_msatoshi/1e3:"")+(i.out_msatoshi?i.out_msatoshi/1e3:"")+(i.fee?i.fee:"")).includes(o),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(u.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-forwarding-history"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Events")}]),e.TTD],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"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"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["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"],["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,"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",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Xc,2,1,"div",1),e.YNc(2,Wc,4,1,"div",2),e.YNc(3,vu,36,7,"div",3),e.YNc(4,bu,1,3,"mat-paginator",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,r.BZ,y.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,P.pW,r.ge,y.nU,r.ev,R.gD,R.$L,B.ey,U.lW,r.yh,r.Q2,u.mk,q.oO,r.XQ,r.Gk,S.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function Su(n,a){if(1&n&&(e.TgZ(0,"div",5),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function wu(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e._UZ(1,"div",7),e.TgZ(2,"mat-form-field",8),e.TgZ(3,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.selFilter)}}function qu(n,a){1&n&&e._UZ(0,"mat-progress-bar",29)}function Fu(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1,"Status"),e.qZA())}function Ou(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,"local_failed"===(null==t?null:t.status)?"local failed":null==t?null:t.status))}}function Ru(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1,"Received Time"),e.qZA())}function Uu(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/YYYY HH:mm"))}}function Nu(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1,"In Channel"),e.qZA())}function ku(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.in_channel_alias)}}function Iu(n,a){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Amount In (Sats)"),e.qZA())}function Mu(n,a){if(1&n&&(e.TgZ(0,"td",31),e.TgZ(1,"span",33),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Eu(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",34),e.TgZ(1,"div",35),e.TgZ(2,"mat-select",36),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",37),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Du(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",38),e.TgZ(1,"button",39),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onFailedEventClick(l)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function Pu(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No failed transaction available."),e.qZA())}function Ju(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting failed transactions..."),e.qZA())}function Qu(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function Yu(n,a){if(1&n&&(e.TgZ(0,"td",40),e.YNc(1,Pu,2,0,"p",41),e.YNc(2,Ju,2,0,"p",41),e.YNc(3,Qu,2,1,"p",41),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Bu=function(n){return{"display-none":n}};function Hu(n,a){if(1&n&&e._UZ(0,"tr",42),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Bu,(null==t.failedForwardingEvents?null:t.failedForwardingEvents.data)&&(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)>0))}}function Vu(n,a){1&n&&e._UZ(0,"tr",43)}function zu(n,a){1&n&&e._UZ(0,"tr",44)}const Gu=function(){return["no_event"]};function Xu(n,a){if(1&n&&(e.TgZ(0,"div",10),e.YNc(1,qu,1,0,"mat-progress-bar",11),e.TgZ(2,"table",12,13),e.ynx(4,14),e.YNc(5,Fu,2,0,"th",15),e.YNc(6,Ou,3,3,"td",16),e.BQk(),e.ynx(7,17),e.YNc(8,Ru,2,0,"th",15),e.YNc(9,Uu,3,4,"td",16),e.BQk(),e.ynx(10,18),e.YNc(11,Nu,2,0,"th",15),e.YNc(12,ku,2,1,"td",16),e.BQk(),e.ynx(13,19),e.YNc(14,Iu,2,0,"th",20),e.YNc(15,Mu,4,4,"td",16),e.BQk(),e.ynx(16,21),e.YNc(17,Eu,6,0,"th",22),e.YNc(18,Du,3,0,"td",23),e.BQk(),e.ynx(19,24),e.YNc(20,Yu,4,3,"td",25),e.BQk(),e.YNc(21,Hu,1,3,"tr",26),e.YNc(22,Vu,1,0,"tr",27),e.YNc(23,zu,1,0,"tr",28),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.failedForwardingEvents),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(6,Gu)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function Wu(n,a){if(1&n&&e._UZ(0,"mat-paginator",45),2&n){const t=e.oxw();e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Ku=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.commonService=i,this.store=o,this.datePipe=l,this.router=d,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.selFilter="",this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS||this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["status","received_time","in_msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["status","received_time","in_channel","in_msatoshi","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,T.Ip)()),this.store.select(h.xQ).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.failedEvents=t.failedForwardingHistory||[],this.failedEvents.length>0&&this.sort&&this.paginator&&this.loadFailedEventsTable(this.failedEvents),this.logger.info(t)})}ngAfterViewInit(){this.failedEvents.length>0&&this.loadFailedEventsTable(this.failedEvents)}onFailedEventClick(t){const i=[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:s.Gi.STRING}],[{key:"status",value:"local_failed"===t.status?"Local Failed":this.commonService.titleCase(t.status),title:"Status",width:50,type:s.Gi.STRING},{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:s.Gi.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:s.Gi.STRING},{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:s.Gi.NUMBER}]];this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Event Information",message:i}}}))}loadFailedEventsTable(t){this.failedForwardingEvents=new r.by([...t]),this.failedForwardingEvents.sort=this.sort,this.failedForwardingEvents.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.failedForwardingEvents.paginator=this.paginator,this.failedForwardingEvents.filterPredicate=(i,o)=>((i.status?"local_failed"===i.status?"local failed":i.status.toLowerCase():"")+(i.received_time?this.datePipe.transform(new Date(1e3*i.received_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.resolved_time?this.datePipe.transform(new Date(1e3*i.resolved_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.in_channel?i.in_channel.toLowerCase():"")+(i.out_channel?i.out_channel.toLowerCase():"")+(i.in_msatoshi?i.in_msatoshi/1e3:"")+(i.out_msatoshi?i.out_msatoshi/1e3:"")+(i.fee?i.fee:"")).includes(o),this.applyFilter(),this.logger.info(this.failedForwardingEvents)}onDownloadCSV(){this.failedForwardingEvents&&this.failedForwardingEvents.data&&this.failedForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedForwardingEvents.data,"Failed-transactions")}applyFilter(){this.failedForwardingEvents.filter=this.selFilter.trim().toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(u.uU),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-failed-history"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Events")}])],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","in_channel"],["matColumnDef","in_msatoshi"],["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_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"],["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,"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",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Su,2,1,"div",1),e.YNc(2,wu,4,1,"div",2),e.YNc(3,Xu,24,7,"div",3),e.YNc(4,Wu,1,3,"mat-paginator",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,r.BZ,y.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,P.pW,r.ge,y.nU,r.ev,R.gD,R.$L,B.ey,U.lW,r.yh,r.Q2,u.mk,q.oO,r.XQ,r.Gk,S.NW],pipes:[u.rS,u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const $u=["tableIn"],ju=["tableOut"],ep=["paginatorIn"],tp=["paginatorOut"];function np(n,a){if(1&n&&(e.TgZ(0,"div",3),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function ip(n,a){1&n&&e._UZ(0,"mat-progress-bar",36)}function ap(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Channel ID"),e.qZA())}const ce=function(n){return{"max-width":n}};function op(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.channel_id)}}function sp(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Peer Alias"),e.qZA())}function lp(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.alias)}}function rp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Events"),e.qZA())}function cp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function up(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Amount (Sats)"),e.qZA())}function pp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function mp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Fee (Sats)"),e.qZA())}function dp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function fp(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No incoming routing peer available."),e.qZA())}function _p(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting incoming routing peers..."),e.qZA())}function hp(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function gp(n,a){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,fp,2,0,"p",43),e.YNc(2,_p,2,0,"p",43),e.YNc(3,hp,2,1,"p",43),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Pe=function(n){return{"display-none":n}};function Cp(n,a){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Pe,(null==t.RoutingPeersIncoming?null:t.RoutingPeersIncoming.data)&&(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function xp(n,a){1&n&&e._UZ(0,"tr",45)}function Tp(n,a){1&n&&e._UZ(0,"tr",46)}function yp(n,a){1&n&&e._UZ(0,"mat-progress-bar",36)}function Zp(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Channel ID"),e.qZA())}function Ap(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.channel_id)}}function Lp(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Peer Alias"),e.qZA())}function vp(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.alias)}}function bp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Events"),e.qZA())}function Sp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function wp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Amount (Sats)"),e.qZA())}function qp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function Fp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Fee (Sats)"),e.qZA())}function Op(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function Rp(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No outgoing routing peer available."),e.qZA())}function Up(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting outgoing routing peers..."),e.qZA())}function Np(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function kp(n,a){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,Rp,2,0,"p",43),e.YNc(2,Up,2,0,"p",43),e.YNc(3,Np,2,1,"p",43),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function Ip(n,a){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Pe,(null==t.RoutingPeersOutgoing?null:t.RoutingPeersOutgoing.data)&&(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function Mp(n,a){1&n&&e._UZ(0,"tr",45)}function Ep(n,a){1&n&&e._UZ(0,"tr",46)}const Dp=function(n,a){return{"mt-2":n,"mt-1":a}},Pp=function(){return["no_incoming_event"]},Jp=function(n){return{"mt-2":n}},Qp=function(){return["no_outgoing_event"]};function Yp(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",4),e.TgZ(1,"div",5),e.TgZ(2,"div",6),e.TgZ(3,"div",7),e._uU(4,"Incoming"),e.qZA(),e.TgZ(5,"mat-form-field",8),e.TgZ(6,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyIncomingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterIn=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",10),e.YNc(8,ip,1,0,"mat-progress-bar",11),e.TgZ(9,"table",12,13),e.ynx(11,14),e.YNc(12,ap,2,0,"th",15),e.YNc(13,op,2,4,"td",16),e.BQk(),e.ynx(14,17),e.YNc(15,sp,2,0,"th",15),e.YNc(16,lp,2,4,"td",16),e.BQk(),e.ynx(17,18),e.YNc(18,rp,2,0,"th",19),e.YNc(19,cp,4,3,"td",20),e.BQk(),e.ynx(20,21),e.YNc(21,up,2,0,"th",19),e.YNc(22,pp,4,4,"td",20),e.BQk(),e.ynx(23,22),e.YNc(24,mp,2,0,"th",19),e.YNc(25,dp,4,4,"td",20),e.BQk(),e.ynx(26,23),e.YNc(27,gp,4,3,"td",24),e.BQk(),e.YNc(28,Cp,1,3,"tr",25),e.YNc(29,xp,1,0,"tr",26),e.YNc(30,Tp,1,0,"tr",27),e.qZA(),e.qZA(),e._UZ(31,"mat-paginator",28,29),e.qZA(),e.TgZ(33,"div",30),e.TgZ(34,"div",6),e.TgZ(35,"div",7),e._uU(36,"Outgoing"),e.qZA(),e.TgZ(37,"mat-form-field",8),e.TgZ(38,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterOut=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(39,"div",31),e.YNc(40,yp,1,0,"mat-progress-bar",11),e.TgZ(41,"table",32,33),e.ynx(43,14),e.YNc(44,Zp,2,0,"th",15),e.YNc(45,Ap,2,4,"td",16),e.BQk(),e.ynx(46,17),e.YNc(47,Lp,2,0,"th",15),e.YNc(48,vp,2,4,"td",16),e.BQk(),e.ynx(49,18),e.YNc(50,bp,2,0,"th",19),e.YNc(51,Sp,4,3,"td",20),e.BQk(),e.ynx(52,21),e.YNc(53,wp,2,0,"th",19),e.YNc(54,qp,4,4,"td",20),e.BQk(),e.ynx(55,22),e.YNc(56,Fp,2,0,"th",19),e.YNc(57,Op,4,4,"td",20),e.BQk(),e.ynx(58,34),e.YNc(59,kp,4,3,"td",24),e.BQk(),e.YNc(60,Ip,1,3,"tr",25),e.YNc(61,Mp,1,0,"tr",26),e.YNc(62,Ep,1,0,"tr",27),e.qZA(),e._UZ(63,"mat-paginator",28,35),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngClass",e.WLB(22,Dp,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),e.xp6(4),e.Q6J("ngModel",t.filterIn),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersIncoming),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(25,Pp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),e.xp6(3),e.Q6J("ngClass",e.VKq(26,Jp,t.screenSize!==t.screenSizeEnum.LG)),e.xp6(4),e.Q6J("ngModel",t.filterOut),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersOutgoing),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(28,Qp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Bp=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.RoutingPeersIncoming=[],this.RoutingPeersOutgoing=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","total_fee"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_fee"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_amount","total_fee"]):(this.flgSticky=!0,this.displayedColumns=["channel_id","alias","events","total_amount","total_fee"])}ngOnInit(){this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.successfulEvents=t.forwardingHistory||[],this.successfulEvents.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadRoutingPeersTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:s.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,t.eventsData.firstChange||this.loadRoutingPeersTable(this.successfulEvents))}loadRoutingPeersTable(t){if(t.length>0){const i=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new r.by(i[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,l)=>JSON.stringify(o).toLowerCase().includes(l),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(i[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,l)=>JSON.stringify(o).toLowerCase().includes(l),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter(),this.logger.info(this.RoutingPeersIncoming),this.logger.info(this.RoutingPeersOutgoing)}groupRoutingPeers(t){const i=[],o=[];return t.forEach(l=>{const d=i.find(J=>J.channel_id===l.in_channel),v=o.find(J=>J.channel_id===l.out_channel);d?(d.events++,d.total_amount=+d.total_amount+ +l.in_msatoshi,d.total_fee=l.in_msatoshi-l.out_msatoshi+ +d.total_fee):i.push({channel_id:l.in_channel,alias:l.in_channel_alias,events:1,total_amount:l.in_msatoshi,total_fee:l.in_msatoshi-l.out_msatoshi}),v?(v.events++,v.total_amount=+v.total_amount+ +l.out_msatoshi,v.total_fee=l.in_msatoshi-l.out_msatoshi+ +v.total_fee):o.push({channel_id:l.out_channel,alias:l.out_channel_alias,events:1,total_amount:l.out_msatoshi,total_fee:l.in_msatoshi-l.out_msatoshi})}),[this.commonService.sortDescByKey(i,"total_fee"),this.commonService.sortDescByKey(o,"total_fee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-routing-peers"]],viewQuery:function(t,i){if(1&t&&(e.Gf($u,5,y.YE),e.Gf(ju,5,y.YE),e.Gf(ep,5),e.Gf(tp,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sortIn=o.first),e.iGM(o=e.CRH())&&(i.sortOut=o.first),e.iGM(o=e.CRH())&&(i.paginatorIn=o.first),e.iGM(o=e.CRH())&&(i.paginatorOut=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Peers")}]),e.TTD],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","page-sub-title-container",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"page-sub-title-container"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto","incoming-table",3,"dataSource"],["tableIn",""],["matColumnDef","channel_id"],["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","total_amount"],["matColumnDef","total_fee"],["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"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["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,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,np,2,1,"div",1),e.YNc(2,Yp,65,29,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,u.mk,q.oO,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,r.BZ,y.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Hp(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let Vp=(()=>{class n{constructor(t){this.router=t,this.faChartBar=x.koM,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Reports"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e.TgZ(7,"nav",5),e.YNc(8,Hp,2,3,"div",6),e.qZA(),e._UZ(9,"router-outlet"),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartBar),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,k.BU,u.sg,C.lC,k.Nj,C.rH],styles:[""]}),n})();var Je=_(4821),Qe=_(6831),Ye=_(3035);function zp(n,a){1&n&&(e.TgZ(0,"div",9),e._UZ(1,"mat-progress-bar",10),e.TgZ(2,"p"),e._uU(3,"Getting fee report..."),e.qZA(),e.qZA())}function Gp(n,a){if(1&n&&(e.TgZ(0,"div",11),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function Xp(n,a){if(1&n&&(e.TgZ(0,"div",12),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.totalFeeMsat),e.xp6(1),e.AsE("",e.xi3(2,3,t.totalFeeMsat/1e3||0,"1.0-2")," Sats/",e.lcZ(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function Wp(n,a){1&n&&(e.TgZ(0,"div",9),e._uU(1,"No fee report for the selected period"),e.qZA())}function Kp(n,a){if(1&n&&(e.TgZ(0,"span"),e.TgZ(1,"span",15),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"span",15),e._uU(5),e.ALo(6,"number"),e.qZA(),e.qZA()),2&n){const t=a.model;e.xp6(2),e.hij("Events: ",e.lcZ(3,2,t.extra.totalEvents||0),""),e.xp6(3),e.hij("Fee: ",e.xi3(6,4,t.value||0,"1.0-2"),"")}}function $p(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical",13),e.NdJ("select",function(o){return e.CHM(t),e.oxw().onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw().onChartMouseUp(o)}),e.YNc(1,Kp,7,7,"ng-template",null,14,e.W1O),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("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 jp(n,a){if(1&n&&e._UZ(0,"rtl-cl-forwarding-history",16),2&n){const t=e.oxw();e.Q6J("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let em=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.reportPeriod=s.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.totalFeeMsat=null,this.today=new Date(Date.now()),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=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===s.cu.XS||this.screenSize===s.cu.SM),this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.events=t.forwardingHistory||[],this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(t)}),this.commonService.containerSizeUpdated.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case s.cu.MD:this.screenPaddingX=t.width/10;break;case s.cu.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,i){const o=Math.round(t.getTime()/1e3),l=Math.round(i.getTime()/1e3);this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeMsat=null,this.events&&this.events.length>0&&(this.events.forEach(d=>{d.received_time>=o&&d.received_time0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===s.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+s.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const i=Math.round(t.getTime()/1e3),o=[];if(this.reportPeriod===s.op[1]){for(let l=0;l<12;l++)o.push({name:s.gg[l].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(l=>{const d=new Date(1e3*+l.received_time).getMonth();return o[d].value=o[d].value+ +l.fee/1e3,o[d].extra.totalEvents=o[d].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +l.fee,this.filteredEventsBySelectedPeriod})}else{for(let l=0;l{const d=Math.floor((+l.received_time-i)/this.secondsInADay);return o[d].value=o[d].value+ +l.fee/1e3,o[d].extra.totalEvents=o[d].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +l.fee,this.filteredEventsBySelectedPeriod})}return o}onSelectionChange(t){const i=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===s.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,i){return 1===t&&i%4==0?s.gg[t].days+1:s.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-fee-report"]],hostBindings:function(t,i){1&t&&e.NdJ("mouseup",function(l){return i.onChartMouseUp(l)})},decls:11,vars:6,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 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1 error-border",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",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","mt-1"],["mode","indeterminate"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1","error-border"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"rtl-horizontal-scroller",1),e.NdJ("stepChanged",function(l){return i.onSelectionChange(l)}),e.qZA(),e.TgZ(2,"div",2),e.YNc(3,zp,4,0,"div",3),e.YNc(4,Gp,2,1,"div",4),e.YNc(5,Xp,4,8,"div",5),e.YNc(6,Wp,2,0,"div",3),e.TgZ(7,"div",6),e.YNc(8,$p,3,11,"ngx-charts-bar-vertical",7),e.qZA(),e.TgZ(9,"div",6),e.YNc(10,jp,1,2,"rtl-cl-forwarding-history",8),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.ERROR),e.xp6(1),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.COMPLETED&&i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),e.xp6(1),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.COMPLETED&&(i.feeReportData.length<=0||i.filteredEventsBySelectedPeriod.length<=0)),e.xp6(2),e.Q6J("ngIf",i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),e.xp6(2),e.Q6J("ngIf",i.filteredEventsBySelectedPeriod&&i.filteredEventsBySelectedPeriod.length>0))},directives:[p.xw,p.Wh,p.yH,Qe.D,u.O5,P.pW,Ye.K$,De],pipes:[u.JJ],styles:[""],data:{animation:[Je.J]}}),n})();var tm=_(6785);function nm(n,a){if(1&n&&(e.TgZ(0,"div",10),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Paid ",e.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function im(n,a){if(1&n&&(e.TgZ(0,"div",10),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Received ",e.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function am(n,a){if(1&n&&(e.TgZ(0,"div",8),e.YNc(1,nm,4,7,"div",9),e.YNc(2,im,4,7,"div",9),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.transactionsReportSummary),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function om(n,a){1&n&&(e.TgZ(0,"div",11),e._uU(1,"No transactions report for the selected period"),e.qZA())}function sm(n,a){if(1&n&&(e.TgZ(0,"span",14),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=a.model;e.xp6(1),e.HOy("",t.name,": ",e.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",e.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function lm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical-2d",12),e.NdJ("select",function(o){return e.CHM(t),e.oxw().onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw().onChartMouseUp(o)}),e.YNc(1,sm,4,9,"ng-template",null,13,e.W1O),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("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:4)}}function rm(n,a){if(1&n&&e._UZ(0,"rtl-transactions-report-table",15),2&n){const t=e.oxw();e.Q6J("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let cm=(()=>{class n{constructor(t,i){this.commonService=t,this.store=i,this.scrollRanges=s.op,this.reportPeriod=s.op[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.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=s.cu,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===s.cu.XS||this.screenSize===s.cu.SM),this.store.select(h.PP).pipe((0,f.R)(this.unSubs[0]),(0,ie.M)(this.store.select(h.gc))).subscribe(([t,i])=>{this.payments=t.payments,this.invoices=i.listInvoices.invoices,this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()}),this.commonService.containerSizeUpdated.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case s.cu.MD:this.screenPaddingX=t.width/10;break;case s.cu.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===s.op[1]?t.series+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+s.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,i){const o=Math.round(t.getTime()/1e3),l=Math.round(i.getTime()/1e3),d=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const v=this.payments.filter(A=>"complete"===A.status&&A.created_at>=o&&A.created_at"paid"===A.status&&A.paid_at>=o&&A.paid_at{const E=new Date(1e3*A.created_at).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+A.msatoshi_sent,d[E].series[0].value=d[E].series[0].value+A.msatoshi_sent/1e3,d[E].series[0].extra.total=d[E].series[0].extra.total+1,this.transactionsReportSummary}),J.map(A=>{const E=new Date(1e3*+A.paid_at).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+A.msatoshi_received,d[E].series[1].value=d[E].series[1].value+A.msatoshi_received/1e3,d[E].series[1].extra.total=d[E].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let A=0;A{const E=Math.floor((+A.created_at-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+A.msatoshi_sent,d[E].series[0].value=d[E].series[0].value+A.msatoshi_sent/1e3,d[E].series[0].extra.total=d[E].series[0].extra.total+1,this.transactionsReportSummary}),J.map(A=>{const E=Math.floor((+A.paid_at-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+A.msatoshi_received,d[E].series[1].value=d[E].series[1].value+A.msatoshi_received/1e3,d[E].series[1].extra.total=d[E].series[1].extra.total+1,this.transactionsReportSummary})}return d}prepareTableData(){return this.transactionsReportData.reduce((t,i)=>i.series[0].extra.total>0||i.series[1].extra.total>0?t.concat({date:i.date,amount_paid:i.series[0].value,num_payments:i.series[0].extra.total,amount_received:i.series[1].value,num_invoices:i.series[1].extra.total}):t,[])}onSelectionChange(t){const i=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===s.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,i){return 1===t&&i%4==0?s.gg[t].days+1:s.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-transactions-report"]],hostBindings:function(t,i){1&t&&e.NdJ("mouseup",function(l){return i.onChartMouseUp(l)})},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"],["class","two-color",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"],[1,"two-color",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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"rtl-horizontal-scroller",1),e.NdJ("stepChanged",function(l){return i.onSelectionChange(l)}),e.qZA(),e.TgZ(2,"div",2),e.YNc(3,am,3,3,"div",3),e.YNc(4,om,2,0,"div",4),e.TgZ(5,"div",5),e.YNc(6,lm,3,13,"ngx-charts-bar-vertical-2d",6),e.qZA(),e.TgZ(7,"div",5),e.YNc(8,rm,1,3,"rtl-transactions-report-table",7),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),e.xp6(1),e.Q6J("ngIf",i.transactionsNonZeroReportData.length<=0),e.xp6(2),e.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),e.xp6(2),e.Q6J("ngIf",i.transactionsNonZeroReportData.length>0))},directives:[p.xw,p.Wh,p.yH,Qe.D,u.O5,Ye.H5,tm.g],pipes:[u.JJ],styles:[""],data:{animation:[Je.J]}}),n})();var w=_(3894),um=_(5704);function pm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let mm=(()=>{class n{constructor(t){this.router=t,this.faSearch=x.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-graph"]],decls:11,vars:2,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"],["fxLayout","column"],["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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Graph Lookups"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e.TgZ(7,"nav",5),e.YNc(8,pm,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faSearch),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,k.BU,u.sg,p.yH,C.lC,k.Nj,C.rH],styles:[""]}),n})();function dm(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.offerError)}}function fm(n,a){if(1&n&&(e.TgZ(0,"div",21),e._UZ(1,"fa-icon",22),e.YNc(2,dm,2,1,"span",23),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.offerError)}}let _m=(()=>{class n{constructor(t,i,o,l,d,v){this.dialogRef=t,this.data=i,this.store=o,this.decimalPipe=l,this.commonService=d,this.actions=v,this.faExclamationTriangle=x.eHv,this.selNode={},this.description="",this.vendor="",this.offerValueHint="",this.information={},this.pageSize=s.IV,this.offerError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t,this.vendor=this.information.alias}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&"SaveNewOffer"===t.payload.action&&(t.payload.status===s.Bn.ERROR&&(this.offerError=t.payload.message),t.payload.status===s.Bn.COMPLETED&&this.dialogRef.close())})}onAddOffer(){this.offerError="",this.store.dispatch((0,T.dh)({payload:{amount:this.offerValue?this.offerValue+"sats":"any",description:this.description,vendor:this.vendor}}))}resetData(){this.description="",this.vendor=this.information.alias,this.offerValue=null,this.offerValueHint="",this.offerError=""}onOfferValueChange(){this.selNode.fiatConversion&&this.offerValue>99&&(this.offerValueHint="",this.commonService.convertCurrency(this.offerValue,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[3])).subscribe({next:t=>{this.offerValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,s.Xz.OTHER)+" "+t.unit},error:t=>{this.offerValueHint="Conversion Error: "+t}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(u.JJ),e.Y36(O.v),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-create-offer"]],decls:28,vars:8,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addOfferForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","1","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","offerValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","58","fxLayoutAlign","start end"],["matInput","","placeholder","Vendor","tabindex","3","name","vendor",3,"ngModel","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","4","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","5",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Create Offer"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7,8),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"input",10),e.NdJ("ngModelChange",function(l){return i.description=l}),e.qZA(),e.qZA(),e.TgZ(13,"div",11),e.TgZ(14,"mat-form-field",12),e.TgZ(15,"input",13),e.NdJ("ngModelChange",function(l){return i.offerValue=l})("keyup",function(){return i.onOfferValueChange()}),e.qZA(),e.TgZ(16,"span",14),e._uU(17," Sats "),e.qZA(),e.TgZ(18,"mat-hint"),e._uU(19),e.qZA(),e.qZA(),e.TgZ(20,"mat-form-field",15),e.TgZ(21,"input",16),e.NdJ("ngModelChange",function(l){return i.vendor=l}),e.qZA(),e.qZA(),e.qZA(),e.YNc(22,fm,3,2,"div",17),e.TgZ(23,"div",18),e.TgZ(24,"button",19),e.NdJ("click",function(){return i.resetData()}),e._uU(25,"Clear Field"),e.qZA(),e.TgZ(26,"button",20),e.NdJ("click",function(){return i.onAddOffer()}),e._uU(27,"Create Offer"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",i.description),e.xp6(3),e.Q6J("ngModel",i.offerValue)("step",100)("min",1),e.xp6(4),e.Oqu(i.offerValueHint),e.xp6(2),e.Q6J("ngModel",i.vendor),e.xp6(1),e.Q6J("ngIf",""!==i.offerError))},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.JJ,c.On,c.wV,c.qQ,X.q,g.R9,g.bx,u.O5,N.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var Be=_(3178);function hm(n,a){1&n&&e._UZ(0,"mat-progress-bar",28)}function gm(n,a){1&n&&(e.TgZ(0,"th",29),e._uU(1," Offer ID "),e.qZA())}const He=function(n){return{"mr-0":n}};function Cm(n,a){if(1&n&&e._UZ(0,"span",35),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,He,t.screenSize===t.screenSizeEnum.XS))}}function xm(n,a){if(1&n&&e._UZ(0,"span",36),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,He,t.screenSize===t.screenSizeEnum.XS))}}const Tm=function(n){return{"max-width":n}};function ym(n,a){if(1&n&&(e.TgZ(0,"td",30),e.TgZ(1,"div",31),e.TgZ(2,"span",32),e.YNc(3,Cm,1,3,"span",33),e.YNc(4,xm,1,3,"span",34),e._uU(5),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(4,Tm,i.screenSize===i.screenSizeEnum.XS?"30rem":"")),e.xp6(2),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active),e.xp6(1),e.hij(" ",t.offer_id," ")}}function Zm(n,a){1&n&&(e.TgZ(0,"th",29),e._uU(1," Single Use "),e.qZA())}function Am(n,a){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t.single_use?"Yes":"No")}}function Lm(n,a){1&n&&(e.TgZ(0,"th",29),e._uU(1," Used "),e.qZA())}function vm(n,a){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",t.used?"Yes":"No"," ")}}function bm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",37),e.TgZ(1,"div",38),e.TgZ(2,"mat-select",39),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Sm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onDisableOffer(o)}),e._uU(1,"Disable Offer"),e.qZA()}}function wm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onPrintOffer(o)}),e._uU(1,"Export QR code"),e.qZA()}}const qm=function(n){return{"px-3":n}};function Fm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",41),e.TgZ(1,"div",42),e.TgZ(2,"mat-select",43),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",40),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onOfferClick(l)}),e._uU(5,"View Info"),e.qZA(),e.YNc(6,Sm,2,0,"mat-option",44),e.YNc(7,wm,2,0,"mat-option",44),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngClass",e.VKq(3,qm,i.screenSize!==i.screenSizeEnum.XS)),e.xp6(6),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",t.active)}}function Om(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No offer available."),e.qZA())}function Rm(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting offers..."),e.qZA())}function Um(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Nm(n,a){if(1&n&&(e.TgZ(0,"td",45),e.YNc(1,Om,2,0,"p",46),e.YNc(2,Rm,2,0,"p",46),e.YNc(3,Um,2,1,"p",46),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const km=function(n){return{"display-none":n}};function Im(n,a){if(1&n&&e._UZ(0,"tr",47),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,km,(null==t.offers?null:t.offers.data)&&(null==t.offers||null==t.offers.data?null:t.offers.data.length)>0))}}function Mm(n,a){1&n&&e._UZ(0,"tr",48)}function Em(n,a){1&n&&e._UZ(0,"tr",49)}const Dm=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Pm=function(){return["no_offer"]};function Qm(n,a){1&n&&e._UZ(0,"mat-progress-bar",29)}function Ym(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1," Updated At "),e.qZA())}function Bm(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,t.updatedAt,"dd/MMM/YYYY HH:mm"))}}function Hm(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1," Title "),e.qZA())}function Vm(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t.title)}}function zm(n,a){1&n&&(e.TgZ(0,"th",32),e._uU(1," Amount (Sats) "),e.qZA())}function Gm(n,a){if(1&n&&(e.TgZ(0,"td",33),e.TgZ(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amountmSat/1e3))}}function Xm(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1," Description "),e.qZA())}function Wm(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t.description)}}function Km(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",35),e.TgZ(1,"div",36),e.TgZ(2,"mat-select",37),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",38),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}const $m=function(n){return{"px-3":n}};function jm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",39),e.TgZ(1,"div",40),e.TgZ(2,"mat-select",41),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",38),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onPaidOfferClick(l)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",38),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onRePayOffer(l)}),e._uU(7,"Pay Again"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,$m,t.screenSize!==t.screenSizeEnum.XS))}}function ed(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No paid offer saved."),e.qZA())}function td(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting paid offers..."),e.qZA())}function nd(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function id(n,a){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,ed,2,0,"p",43),e.YNc(2,td,2,0,"p",43),e.YNc(3,nd,2,1,"p",43),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.paidOffers&&t.paidOffers.data)||(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.paidOffers&&t.paidOffers.data)||(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.paidOffers&&t.paidOffers.data)||(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const ad=function(n){return{"display-none":n}};function od(n,a){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,ad,(null==t.paidOffers?null:t.paidOffers.data)&&(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)>0))}}function sd(n,a){1&n&&e._UZ(0,"tr",45)}function ld(n,a){1&n&&e._UZ(0,"tr",46)}const rd=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},cd=function(){return["no_offer"]},md=C.Bz.forChild([{path:"",component:ge,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Ki,canActivate:[w.lB]},{path:"onchain",component:uo,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:bs,canActivate:[w.lB]},{path:"send/:selTab",component:Oe,data:{sweepAll:!1},canActivate:[w.lB]},{path:"sweep/:selTab",component:Oe,data:{sweepAll:!0},canActivate:[w.lB]}]},{path:"connections",component:fo,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:Ws,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:Pl,canActivate:[w.lB]},{path:"pending",component:br,canActivate:[w.lB]}]},{path:"peers",component:fc,data:{sweepAll:!1},canActivate:[w.lB]}]},{path:"transactions",component:ho,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:ve,canActivate:[w.lB]},{path:"invoices",component:Ae,canActivate:[w.lB]},{path:"offers",component:(()=>{class n{constructor(t,i,o,l){this.logger=t,this.store=i,this.commonService=o,this.rtlEffects=l,this.faHistory=x.qO$,this.selNode={},this.newlyAddedOfferMemo="",this.newlyAddedOfferValue=0,this.description="",this.offerValue=null,this.offerValueHint="",this.displayedColumns=[],this.offerPaymentReq="",this.offerJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","used","actions"]):(this.flgSticky=!0,this.displayedColumns=["offer_id","single_use","used","actions"])}ngOnInit(){this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(h.Y_).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.offerJSONArr=t.offers||[],this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr)}openCreateOfferModal(){this.store.dispatch((0,L.qR)({payload:{data:{pageSize:this.pageSize,component:_m}}}))}onOfferClick(t){this.store.dispatch((0,L.qR)({payload:{data:{offer:{used:t.used,single_use:t.single_use,active:t.active,offer_id:t.offer_id,bolt12:t.bolt12,bolt12_unsigned:t.bolt12_unsigned},newlyAdded:!1,component:Be.V}}}))}onDisableOffer(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Disable Offer",titleMessage:"Disabling Offer: "+(t.offer_id||t.bolt12),noBtnText:"Cancel",yesBtnText:"Disable"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[3])).subscribe(i=>{i&&this.store.dispatch((0,T.i9)({payload:{offer_id:t.offer_id}}))})}onPrintOffer(t){}applyFilter(){this.offers.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.offers=new r.by(t?[...t]:[]),this.offers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.offers.sort=this.sort,this.offers.filterPredicate=(i,o)=>(("active"===o||"inactive"===o||"used"===o||"unused"===o||"single"===o||"multiple"===o)&&(o=" "+o),((i.active?" active":" inactive")+(i.used?" used":" unused")+(i.single_use?" single":" multiple")+JSON.stringify(i).toLowerCase()).includes(o)),this.offers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offers.data&&this.offers.data.length>0&&this.commonService.downloadFile(this.offers.data,"Offers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v),e.Y36(W.V))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-offers-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Offers")}])],decls:34,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","offer_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","single_use"],["matColumnDef","used"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["class","dot green","matTooltip","Active","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Inactive","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Active","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Inactive","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["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"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return i.openCreateOfferModal()}),e._uU(3,"Create Offer"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"div",4),e.TgZ(6,"div",5),e._UZ(7,"fa-icon",6),e.TgZ(8,"span",7),e._uU(9,"Offers History"),e.qZA(),e.qZA(),e.TgZ(10,"mat-form-field",8),e.TgZ(11,"input",9),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,hm,1,0,"mat-progress-bar",11),e.TgZ(14,"table",12,13),e.ynx(16,14),e.YNc(17,gm,2,0,"th",15),e.YNc(18,ym,6,6,"td",16),e.BQk(),e.ynx(19,17),e.YNc(20,Zm,2,0,"th",15),e.YNc(21,Am,2,1,"td",16),e.BQk(),e.ynx(22,18),e.YNc(23,Lm,2,0,"th",15),e.YNc(24,vm,2,1,"td",16),e.BQk(),e.ynx(25,19),e.YNc(26,bm,6,0,"th",20),e.YNc(27,Fm,8,5,"td",21),e.BQk(),e.ynx(28,22),e.YNc(29,Nm,4,3,"td",23),e.BQk(),e.YNc(30,Im,1,3,"tr",24),e.YNc(31,Mm,1,0,"tr",25),e.YNc(32,Em,1,0,"tr",26),e.qZA(),e.qZA(),e._UZ(33,"mat-paginator",27),e.qZA(),e.qZA()),2&t&&(e.xp6(7),e.Q6J("icon",i.faHistory),e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(2),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.offers)("ngClass",e.VKq(12,Dm,""!==i.errorMessage)),e.xp6(16),e.Q6J("matFooterRowDef",e.DdM(14,Pm)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,U.lW,N.BN,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],styles:[".mat-column-offer_id[_ngcontent-%COMP%]{flex:0 0 65%;width:65%}.mat-column-offer_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})(),canActivate:[w.lB]},{path:"paidoffr",component:(()=>{class n{constructor(t,i,o){this.logger=t,this.store=i,this.commonService=o,this.faHistory=x.qO$,this.displayedColumns=[],this.paidOfferJSONArr=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.selFilter="",this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS||this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["updatedAt","title","amountmSat","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["updatedAt","title","amountmSat","description","actions"]):(this.flgSticky=!0,this.displayedColumns=["updatedAt","title","amountmSat","description","actions"])}ngOnInit(){this.store.select(h._H).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paidOfferJSONArr=t.paidOffers||[],this.paidOfferJSONArr&&this.paidOfferJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.paidOfferJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paidOfferJSONArr&&this.paidOfferJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.paidOfferJSONArr)}onPaidOfferClick(t){this.store.dispatch((0,L.qR)({payload:{data:{offer:{bolt12:t.offerBolt12},newlyAdded:!1,component:Be.V}}}))}onRePayOffer(t){this.store.dispatch((0,L.qR)({payload:{data:{paymentType:s.IX.OFFER,offerBolt12:t.offerBolt12,offerTitle:t.title,offerUUId:t.id,component:Le}}}))}applyFilter(){this.paidOffers.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.paidOffers=new r.by(t?[...t]:[]),this.paidOffers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.paidOffers.sort=this.sort,this.paidOffers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.paidOffers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.paidOffers.data&&this.paidOffers.data.length>0&&this.commonService.downloadFile(this.paidOffers.data,"PaidSavedOffers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-paid-offers-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Paid Offers")}])],decls:34,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","updatedAt"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","amountmSat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span",5),e._uU(6,"Paid & Saved Offers"),e.qZA(),e.qZA(),e.TgZ(7,"mat-form-field",6),e.TgZ(8,"input",7),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"div",8),e.YNc(10,Qm,1,0,"mat-progress-bar",9),e.TgZ(11,"table",10,11),e.ynx(13,12),e.YNc(14,Ym,2,0,"th",13),e.YNc(15,Bm,3,4,"td",14),e.BQk(),e.ynx(16,15),e.YNc(17,Hm,2,0,"th",13),e.YNc(18,Vm,2,1,"td",14),e.BQk(),e.ynx(19,16),e.YNc(20,zm,2,0,"th",17),e.YNc(21,Gm,4,3,"td",18),e.BQk(),e.ynx(22,19),e.YNc(23,Xm,2,0,"th",13),e.YNc(24,Wm,2,1,"td",14),e.BQk(),e.ynx(25,20),e.YNc(26,Km,6,0,"th",21),e.YNc(27,jm,8,3,"td",22),e.BQk(),e.ynx(28,23),e.YNc(29,id,4,3,"td",24),e.BQk(),e.YNc(30,od,1,3,"tr",25),e.YNc(31,sd,1,0,"tr",26),e.YNc(32,ld,1,0,"tr",27),e.qZA(),e.qZA(),e._UZ(33,"mat-paginator",28),e.qZA(),e.qZA()),2&t&&(e.xp6(4),e.Q6J("icon",i.faHistory),e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(2),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.paidOffers)("ngClass",e.VKq(12,rd,""!==i.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(14,cd)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,N.BN,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],styles:[".mat-column-offer_id[_ngcontent-%COMP%]{flex:0 0 65%;width:65%}.mat-column-offer_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})(),canActivate:[w.lB]}]},{path:"messages",component:As,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:Pc,canActivate:[w.lB]},{path:"verify",component:Gc,canActivate:[w.lB]}]},{path:"routing",component:Co,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:De,canActivate:[w.lB]},{path:"failedtransactions",component:Ku,canActivate:[w.lB]},{path:"routingpeers",component:Bp,canActivate:[w.lB]}]},{path:"reports",component:Vp,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:em,canActivate:[w.lB]},{path:"transactions",component:cm,canActivate:[w.lB]}]},{path:"graph",component:mm,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:Wo,canActivate:[w.lB]},{path:"queryroutes",component:Ec,canActivate:[w.lB]}]},{path:"rates",component:ys,canActivate:[w.lB]},{path:"**",component:um.w},{path:"network",redirectTo:"rates"},{path:"wallet",redirectTo:"home"},{path:"backup",redirectTo:"home"}]}]);var dd=_(3387);let fd=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n,bootstrap:[ge]}),n.\u0275inj=e.cJS({providers:[w.lB],imports:[[u.ez,dd.m,md]]}),n})()}}]); \ No newline at end of file diff --git a/angular/142.ed7fc40bd089bbbb.js b/angular/142.ed7fc40bd089bbbb.js new file mode 100644 index 00000000..001b8e4e --- /dev/null +++ b/angular/142.ed7fc40bd089bbbb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[142],{142:(hd,he,_)=>{_.r(he),_.d(he,{CLModule:()=>fd});var u=_(6019),C=_(7292),Ve=_(7362),e=_(3668),p=_(2438),P=_(9009);function ze(n,a){1&n&&e._UZ(0,"mat-progress-bar",3)}let ge=(()=>{class n{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(i=>{switch(!0){case i instanceof C.OD:this.loading=!0;break;case i instanceof C.m2:case i instanceof C.gk:case i instanceof C.Q3:this.loading=!1}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,ze,1,0,"mat-progress-bar",1),e._UZ(2,"router-outlet",null,2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",i.loading))},directives:[p.xw,p.yH,p.Wh,u.O5,C.lC,P.pW],styles:[""],data:{animation:[Ve.g]}}),n})();var m=_(7396),f=_(5022),ie=_(1818),Ce=_(6424),x=_(9594),s=_(4798),h=_(7634),F=_(507),b=_(7852),H=_(6309),O=_(4234),N=_(3868),ae=_(6167),Z=_(888),ue=_(3530),q=_(8866),U=_(86),pe=_(9112);const xe=function(n){return{backgroundColor:n}};function Ge(n,a){if(1&n&&e._UZ(0,"span",6),2&n){const t=e.oxw();e.Q6J("ngStyle",e.VKq(1,xe,"#"+(null==t.information?null:t.information.color)))}}function Xe(n,a){if(1&n&&(e.TgZ(0,"div"),e.TgZ(1,"h4",1),e._uU(2,"Color"),e.qZA(),e.TgZ(3,"div",2),e._UZ(4,"span",7),e._uU(5),e.ALo(6,"uppercase"),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngStyle",e.VKq(4,xe,"#"+(null==t.information?null:t.information.color))),e.xp6(1),e.hij(" ",e.lcZ(6,2,null==t.information?null:t.information.color)," ")}}function We(n,a){if(1&n&&(e.TgZ(0,"span",2),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t)}}let Te=(()=>{class n{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain)+" "+this.commonService.titleCase(t.network))}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[e.TTD],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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div"),e.TgZ(2,"h4",1),e._uU(3,"Alias"),e.qZA(),e.TgZ(4,"div",2),e._uU(5),e.YNc(6,Ge,1,3,"span",3),e.qZA(),e.qZA(),e.YNc(7,Xe,7,6,"div",4),e.TgZ(8,"div"),e.TgZ(9,"h4",1),e._uU(10,"Implementation"),e.qZA(),e.TgZ(11,"div",2),e._uU(12),e.qZA(),e.qZA(),e.TgZ(13,"div"),e.TgZ(14,"h4",1),e._uU(15,"Chain"),e.qZA(),e.YNc(16,We,2,1,"span",5),e.qZA(),e.qZA()),2&t&&(e.xp6(5),e.hij(" ",null==i.information?null:i.information.alias," "),e.xp6(1),e.Q6J("ngIf",!i.showColorFieldSeparately),e.xp6(1),e.Q6J("ngIf",i.showColorFieldSeparately),e.xp6(5),e.Oqu(null!=i.information&&i.information.lnImplementation||null!=i.information&&i.information.version?(null==i.information?null:i.information.lnImplementation)+" "+(null==i.information?null:i.information.version):""),e.xp6(4),e.Q6J("ngForOf",i.chains))},directives:[p.xw,p.yH,p.Wh,u.O5,u.sg,u.PC,q.Zl],pipes:[u.gd],styles:[""]}),n})();function Ke(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div"),e.TgZ(2,"h4",3),e._uU(3,"Lightning"),e.qZA(),e.TgZ(4,"div",4),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",5),e.qZA(),e.TgZ(8,"div"),e.TgZ(9,"h4",3),e._uU(10,"On-chain"),e.qZA(),e.TgZ(11,"div",4),e._uU(12),e.ALo(13,"number"),e.qZA(),e._UZ(14,"mat-progress-bar",5),e.qZA(),e.TgZ(15,"div"),e.TgZ(16,"h4",3),e._uU(17,"Total"),e.qZA(),e.TgZ(18,"div",4),e._uU(19),e.ALo(20,"number"),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(5),e.hij("",e.lcZ(6,5,t.balances.lightning)," Sats"),e.xp6(2),e.s9C("value",t.balances.lightning/t.balances.total*100),e.xp6(5),e.hij("",e.lcZ(13,7,t.balances.onchain)," Sats"),e.xp6(2),e.s9C("value",t.balances.onchain/t.balances.total*100),e.xp6(5),e.hij("",e.lcZ(20,9,t.balances.total)," Sats")}}function $e(n,a){if(1&n&&(e.TgZ(0,"div",6),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let je=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,Ke,21,11,"div",0),e.YNc(1,$e,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,P.pW],pipes:[u.JJ],styles:[""]}),n})();var g=_(8167),Q=_(7444),G=_(5694),Y=_(7706);function et(n,a){if(1&n&&(e.TgZ(0,"div",19),e.TgZ(1,"span",20),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",6),e.TgZ(5,"mat-hint",21),e.TgZ(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",22),e._UZ(11,"fa-icon",23),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",24),e.TgZ(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA(),e.qZA(),e._UZ(19,"mat-progress-bar",25),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.alias||t.id),e.s9C("matTooltipDisabled",(t.alias||t.id).length<26),e.xp6(1),e.AsE("",e.Dn7(3,9,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":"",""),e.xp6(6),e.hij("",e.xi3(9,13,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats"),e.xp6(3),e.Q6J("icon",i.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,16,t.balancedness||0),") "),e.xp6(5),e.hij("",e.xi3(18,18,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats"),e.xp6(2),e.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function tt(n,a){if(1&n&&(e.TgZ(0,"div",17),e.YNc(1,et,20,21,"div",18),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.activeChannels)}}function nt(n,a){if(1&n&&(e.TgZ(0,"div",3),e.TgZ(1,"div",4),e.TgZ(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"div",6),e.TgZ(5,"mat-hint",7),e.TgZ(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",9),e._UZ(11,"fa-icon",10),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",11),e.TgZ(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA(),e.qZA(),e._UZ(19,"mat-progress-bar",12),e.qZA(),e.TgZ(20,"div",13),e._UZ(21,"mat-divider",14),e.qZA(),e.TgZ(22,"div",15),e.YNc(23,tt,2,1,"div",16),e.qZA(),e.qZA()),2&n){const t=e.oxw(),i=e.MAs(2);e.xp6(8),e.hij("",e.xi3(9,7,(null==t.channelBalances?null:t.channelBalances.localBalance)||0,"1.0-0")," Sats"),e.xp6(3),e.Q6J("icon",t.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,10,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),e.xp6(5),e.hij("",e.xi3(18,12,(null==t.channelBalances?null:t.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),e.xp6(2),e.s9C("value",null!=t.channelBalances&&t.channelBalances.localBalance&&(null==t.channelBalances?null:t.channelBalances.localBalance)>0?+(null==t.channelBalances?null:t.channelBalances.localBalance)/(+(null==t.channelBalances?null:t.channelBalances.localBalance)+ +(null==t.channelBalances?null:t.channelBalances.remoteBalance))*100:0),e.xp6(4),e.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",i)}}function it(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",26),e._uU(1," No channels available. "),e.TgZ(2,"button",27),e.NdJ("click",function(){return e.CHM(t),e.oxw().goToChannels()}),e._uU(3,"Open Channel"),e.qZA(),e.qZA()}}function at(n,a){if(1&n&&(e.TgZ(0,"div",28),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let ot=(()=>{class n{constructor(t){this.router=t,this.faBalanceScale=x.DL8,this.faDumbbell=x.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",activeChannels:"activeChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,nt,24,15,"div",0),e.YNc(1,it,4,0,"ng-template",null,1,e.W1O),e.YNc(3,at,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,g.bx,N.BN,Q.gM,P.pW,G.d,Y.$V,u.sg,U.lW],pipes:[u.JJ,u.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function st(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div"),e.TgZ(3,"h4",4),e._uU(4,"Total"),e.qZA(),e.TgZ(5,"div",5),e._uU(6),e.ALo(7,"number"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",3),e.TgZ(9,"div"),e.TgZ(10,"h4",4),e._uU(11,"Transactions"),e.qZA(),e.TgZ(12,"div",5),e._uU(13),e.ALo(14,"number"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.hij("",e.lcZ(7,2,(null==t.fees?null:t.fees.feeCollected)/1e3)," Sats"),e.xp6(7),e.Oqu(e.lcZ(14,4,null==t.fees?null:t.fees.totalTxCount))}}function lt(n,a){if(1&n&&(e.TgZ(0,"div",6),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let ye=(()=>{class n{constructor(){this.totalFees=[{name:"Total",value:0}]}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,st,15,6,"div",0),e.YNc(1,lt,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function rt(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div"),e.TgZ(3,"h4",4),e._uU(4,"Active"),e.qZA(),e.TgZ(5,"div",5),e._UZ(6,"span",6),e._uU(7),e.ALo(8,"number"),e.qZA(),e.qZA(),e.TgZ(9,"div"),e.TgZ(10,"h4",4),e._uU(11,"Pending"),e.qZA(),e.TgZ(12,"div",5),e._UZ(13,"span",7),e._uU(14),e.ALo(15,"number"),e.qZA(),e.qZA(),e.TgZ(16,"div"),e.TgZ(17,"h4",4),e._uU(18,"Inactive"),e.qZA(),e.TgZ(19,"div",5),e._UZ(20,"span",8),e._uU(21),e.ALo(22,"number"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(23,"div",3),e.TgZ(24,"div"),e.TgZ(25,"h4",4),e._uU(26,"Capacity"),e.qZA(),e.TgZ(27,"div",5),e._uU(28),e.ALo(29,"number"),e.qZA(),e.qZA(),e.TgZ(30,"div"),e.TgZ(31,"h4",4),e._uU(32,"Capacity"),e.qZA(),e.TgZ(33,"div",5),e._uU(34),e.ALo(35,"number"),e.qZA(),e.qZA(),e.TgZ(36,"div"),e.TgZ(37,"h4",4),e._uU(38,"Capacity"),e.qZA(),e.TgZ(39,"div",5),e._uU(40),e.ALo(41,"number"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(7),e.Oqu(e.lcZ(8,6,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.channels)||0)),e.xp6(7),e.Oqu(e.lcZ(15,8,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.channels)||0)),e.xp6(7),e.Oqu(e.lcZ(22,10,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.channels)||0)),e.xp6(7),e.hij("",e.lcZ(29,12,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(35,14,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(41,16,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.capacity)||0)," Sats")}}function ct(n,a){if(1&n&&(e.TgZ(0,"div",9),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Ze=(()=>{class n{constructor(){this.channelsStatus={active:{},pending:{},inactive:{}}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,rt,42,18,"div",0),e.YNc(1,ct,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function ut(n,a){if(1&n&&(e.TgZ(0,"mat-hint",19),e.TgZ(1,"strong",20),e._uU(2,"Capacity: "),e.qZA(),e._uU(3),e.ALo(4,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.hij("",e.xi3(4,1,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats")}}function pt(n,a){if(1&n&&(e.TgZ(0,"mat-hint",19),e.TgZ(1,"strong",20),e._uU(2,"Capacity: "),e.qZA(),e._uU(3),e.ALo(4,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.hij("",e.xi3(4,1,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats")}}function mt(n,a){if(1&n&&e._UZ(0,"mat-progress-bar",21),2&n){const t=e.oxw().$implicit,i=e.oxw(3);e.s9C("value",i.totalLiquidity>0?(+t.msatoshi_to_them/1e3||0)/i.totalLiquidity*100:0)}}function dt(n,a){if(1&n&&e._UZ(0,"mat-progress-bar",21),2&n){const t=e.oxw().$implicit,i=e.oxw(3);e.s9C("value",i.totalLiquidity>0?(+t.msatoshi_to_us/1e3||0)/i.totalLiquidity*100:0)}}function ft(n,a){if(1&n&&(e.TgZ(0,"div",14),e.TgZ(1,"span",15),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",16),e.YNc(5,ut,5,4,"mat-hint",17),e.YNc(6,pt,5,4,"mat-hint",17),e.qZA(),e.YNc(7,mt,1,1,"mat-progress-bar",18),e.YNc(8,dt,1,1,"mat-progress-bar",18),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.alias||t.id),e.s9C("matTooltipDisabled",(t.alias||t.id).length<26),e.xp6(1),e.AsE("",e.Dn7(3,8,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":"",""),e.xp6(3),e.Q6J("ngIf","In"===i.direction),e.xp6(1),e.Q6J("ngIf","Out"===i.direction),e.xp6(1),e.Q6J("ngIf","In"===i.direction),e.xp6(1),e.Q6J("ngIf","Out"===i.direction)}}function _t(n,a){if(1&n&&(e.TgZ(0,"div",12),e.YNc(1,ft,9,12,"div",13),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.activeChannels)}}const ht=function(n,a,t){return{"mb-4":n,"mb-2":a,"mb-1":t}};function gt(n,a){if(1&n&&(e.TgZ(0,"div",3),e.TgZ(1,"div",4),e.TgZ(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"mat-hint",6),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",7),e.qZA(),e.TgZ(8,"div",8),e._UZ(9,"mat-divider",9),e.qZA(),e.TgZ(10,"div",10),e.YNc(11,_t,2,1,"div",11),e.qZA(),e.qZA()),2&n){const t=e.oxw(),i=e.MAs(2);e.Q6J("ngClass",e.kEZ(7,ht,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(5),e.hij("",e.xi3(6,4,t.totalLiquidity,"1.0-0")," Sats"),e.xp6(6),e.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",i)}}function Ct(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).goToChannels()}),e._uU(1,"Open Channel"),e.qZA()}}function xt(n,a){if(1&n&&(e.TgZ(0,"div",22),e._uU(1," No channels available. "),e.YNc(2,Ct,2,0,"button",23),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngIf","Out"===t.direction)}}function Tt(n,a){if(1&n&&(e.TgZ(0,"div",25),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let yt=(()=>{class n{constructor(t,i){this.router=t,this.commonService=i,this.screenSize="",this.screenSizeEnum=s.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",activeChannels:"activeChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,gt,12,11,"div",0),e.YNc(1,xt,3,1,"ng-template",null,1,e.W1O),e.YNc(3,Tt,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,u.mk,q.oO,g.bx,P.pW,G.d,Y.$V,u.sg,Q.gM,U.lW],pipes:[u.JJ,u.OU],styles:[""]}),n})();var k=_(2605),D=_(181),S=_(8977),y=_(2262),r=_(4176),M=_(5304),T=_(664),c=_(9133),I=_(138),V=_(266),X=_(4786),R=_(6400),oe=_(9511),B=_(6731);function Zt(n,a){if(1&n&&(e.TgZ(0,"mat-option",26),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(e.lcZ(2,2,t))}}function At(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.invoiceError)}}function Lt(n,a){if(1&n&&(e.TgZ(0,"div",27),e._UZ(1,"fa-icon",28),e.YNc(2,At,2,1,"span",29),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.invoiceError)}}let vt=(()=>{class n{constructor(t,i,o,l,d,v){this.dialogRef=t,this.data=i,this.store=o,this.decimalPipe=l,this.commonService=d,this.actions=v,this.faExclamationTriangle=x.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=s.IV,this.timeUnitEnum=s.Qk,this.timeUnits=s.LO,this.selTimeUnit=s.Qk.SECS,this.invoiceError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&"SaveNewInvoice"===t.payload.action&&(t.payload.status===s.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===s.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let i=this.expiry?this.expiry:3600;this.selTimeUnit!==s.Qk.SECS&&(i=this.commonService.convertTime(this.expiry,this.selTimeUnit,s.Qk.SECS)),this.store.dispatch((0,T.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:i,private:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=s.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,s.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}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(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(u.JJ),e.Y36(O.v),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-create-invoices"]],decls:37,vars:17,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","name","expiry","placeholder","Expiry","type","number","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayoutAlign","start center",1,"mt-2"],["tabindex","6","color","primary","matTooltip","Include routing hints for private channels","name","private",3,"ngModel","matTooltipPosition","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Create Invoice"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7,8),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"input",10),e.NdJ("ngModelChange",function(d){return i.description=d}),e.qZA(),e.qZA(),e.TgZ(13,"div",11),e.TgZ(14,"mat-form-field",12),e.TgZ(15,"input",13),e.NdJ("ngModelChange",function(d){return i.invoiceValue=d})("keyup",function(){return i.onInvoiceValueChange()}),e.qZA(),e.TgZ(16,"span",14),e._uU(17," Sats "),e.qZA(),e.TgZ(18,"mat-hint"),e._uU(19),e.qZA(),e.qZA(),e.TgZ(20,"mat-form-field",15),e.TgZ(21,"input",16),e.NdJ("ngModelChange",function(d){return i.expiry=d}),e.qZA(),e.TgZ(22,"span",14),e._uU(23),e.ALo(24,"titlecase"),e.qZA(),e.qZA(),e.TgZ(25,"mat-form-field",17),e.TgZ(26,"mat-select",18),e.NdJ("selectionChange",function(d){return i.onTimeUnitChange(d)}),e.YNc(27,Zt,3,4,"mat-option",19),e.qZA(),e.qZA(),e.qZA(),e.TgZ(28,"div",20),e.TgZ(29,"mat-slide-toggle",21),e.NdJ("ngModelChange",function(d){return i.private=d}),e._uU(30,"Private Routing Hints"),e.qZA(),e.qZA(),e.YNc(31,Lt,3,2,"div",22),e.TgZ(32,"div",23),e.TgZ(33,"button",24),e.NdJ("click",function(){return i.resetData()}),e._uU(34,"Clear Field"),e.qZA(),e.TgZ(35,"button",25),e.NdJ("click",function(){e.CHM(o);const d=e.MAs(10);return i.onAddInvoice(d)}),e._uU(36,"Create Invoice"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",i.description),e.xp6(3),e.Q6J("ngModel",i.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(i.invoiceValueHint),e.xp6(2),e.Q6J("ngModel",i.expiry)("step",i.selTimeUnit===i.timeUnitEnum.SECS?300:i.selTimeUnit===i.timeUnitEnum.MINS?10:i.selTimeUnit===i.timeUnitEnum.HOURS?2:1)("min",1),e.xp6(2),e.hij(" ",e.lcZ(24,15,i.selTimeUnit)," "),e.xp6(3),e.Q6J("value",i.selTimeUnit),e.xp6(1),e.Q6J("ngForOf",i.timeUnits),e.xp6(2),e.Q6J("ngModel",i.private)("matTooltipPosition","above"),e.xp6(2),e.Q6J("ngIf",""!==i.invoiceError))},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.JJ,c.On,c.wV,c.qQ,X.q,g.R9,g.bx,R.gD,u.sg,oe.Rr,Q.gM,u.O5,B.ey,N.BN],pipes:[u.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var bt=_(7179),L=_(4097),W=_(6718);function St(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5),e.TgZ(2,"mat-form-field",6),e.TgZ(3,"input",7),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().description=o}),e.qZA(),e.qZA(),e.TgZ(4,"mat-form-field",8),e.TgZ(5,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().invoiceValue=o})("keyup",function(){return e.CHM(t),e.oxw().onInvoiceValueChange()}),e.qZA(),e.TgZ(6,"span",10),e._uU(7," Sats "),e.qZA(),e.TgZ(8,"mat-hint"),e._uU(9),e.qZA(),e.qZA(),e.TgZ(10,"div",11),e.TgZ(11,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(12,"Clear Field"),e.qZA(),e.TgZ(13,"button",13),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(1);return e.oxw().onAddInvoice(o)}),e._uU(14,"Create Invoice"),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.description),e.xp6(2),e.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(t.invoiceValueHint)}}function wt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",14),e.TgZ(1,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDeleteExpiredInvoices()}),e._uU(2,"Delete Expired"),e.qZA(),e.TgZ(3,"button",16),e.NdJ("click",function(){return e.CHM(t),e.oxw().openCreateInvoiceModal()}),e._uU(4,"Create Invoice"),e.qZA(),e.qZA()}}function qt(n,a){1&n&&e._UZ(0,"mat-progress-bar",45)}function Ft(n,a){1&n&&(e.TgZ(0,"th",46),e._uU(1," Expiry Date "),e.qZA())}const me=function(n){return{"mr-0":n}};function Ot(n,a){if(1&n&&e._UZ(0,"span",51),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,me,t.screenSize===t.screenSizeEnum.XS))}}function Rt(n,a){if(1&n&&e._UZ(0,"span",52),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,me,t.screenSize===t.screenSizeEnum.XS))}}function Ut(n,a){if(1&n&&e._UZ(0,"span",53),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,me,t.screenSize===t.screenSizeEnum.XS))}}function Nt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.YNc(1,Ot,1,3,"span",48),e.YNc(2,Rt,1,3,"span",49),e.YNc(3,Ut,1,3,"span",50),e._uU(4),e.ALo(5,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf","paid"===t.status),e.xp6(1),e.Q6J("ngIf","unpaid"===t.status),e.xp6(1),e.Q6J("ngIf","expired"===t.status),e.xp6(1),e.hij(" ",e.xi3(5,4,1e3*t.expires_at,"dd/MMM/YYYY HH:mm")," ")}}function kt(n,a){1&n&&(e.TgZ(0,"th",46),e._uU(1," Date Settled "),e.qZA())}function It(n,a){if(1&n&&(e.TgZ(0,"td",47),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*t.paid_at,"dd/MMM/YYYY HH:mm")||"-")}}function Mt(n,a){1&n&&(e.TgZ(0,"th",46),e._uU(1," Description "),e.qZA())}const Et=function(n){return{"max-width":n}};function Dt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.TgZ(1,"div",54),e.TgZ(2,"span",55),e._uU(3),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(2,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"32rem")),e.xp6(2),e.Oqu(t.description)}}function Pt(n,a){1&n&&(e.TgZ(0,"th",56),e._uU(1," Amount (Sats) "),e.qZA())}function Jt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.TgZ(1,"span",57),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0"),"")}}function Qt(n,a){1&n&&(e.TgZ(0,"th",56),e._uU(1," Amount Settled (Sats) "),e.qZA())}function Yt(n,a){if(1&n&&(e.TgZ(0,"td",47),e.TgZ(1,"span",57),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,t.msatoshi_received/1e3,t.msatoshi_received<1e3?"1.0-4":"1.0-0"),"")}}function Bt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",58),e.TgZ(1,"div",59),e.TgZ(2,"mat-select",60),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",61),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}const Ht=function(n){return{"px-3":n}};function Vt(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",62),e.TgZ(1,"div",63),e.TgZ(2,"mat-select",64),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",61),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onInvoiceClick(l)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",61),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onRefreshInvoice(l)}),e._uU(7,"Refresh"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Ht,t.screenSize!==t.screenSizeEnum.XS))}}function zt(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No invoice available."),e.qZA())}function Gt(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting invoices..."),e.qZA())}function Xt(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function Wt(n,a){if(1&n&&(e.TgZ(0,"td",65),e.YNc(1,zt,2,0,"p",66),e.YNc(2,Gt,2,0,"p",66),e.YNc(3,Xt,2,1,"p",66),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Kt=function(n){return{"display-none":n}};function $t(n,a){if(1&n&&e._UZ(0,"tr",67),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Kt,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function jt(n,a){1&n&&e._UZ(0,"tr",68)}function en(n,a){1&n&&e._UZ(0,"tr",69)}const tn=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},nn=function(){return["no_invoice"]};function an(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",17),e.TgZ(1,"div",18),e.TgZ(2,"div",19),e._UZ(3,"fa-icon",20),e.TgZ(4,"span",21),e._uU(5,"Invoices History"),e.qZA(),e.qZA(),e.TgZ(6,"mat-form-field",22),e.TgZ(7,"input",23),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",24),e.YNc(9,qt,1,0,"mat-progress-bar",25),e.TgZ(10,"table",26,27),e.ynx(12,28),e.YNc(13,Ft,2,0,"th",29),e.YNc(14,Nt,6,7,"td",30),e.BQk(),e.ynx(15,31),e.YNc(16,kt,2,0,"th",29),e.YNc(17,It,3,4,"td",30),e.BQk(),e.ynx(18,32),e.YNc(19,Mt,2,0,"th",29),e.YNc(20,Dt,4,4,"td",30),e.BQk(),e.ynx(21,33),e.YNc(22,Pt,2,0,"th",34),e.YNc(23,Jt,4,4,"td",30),e.BQk(),e.ynx(24,35),e.YNc(25,Qt,2,0,"th",34),e.YNc(26,Yt,4,4,"td",30),e.BQk(),e.ynx(27,36),e.YNc(28,Bt,6,0,"th",37),e.YNc(29,Vt,8,3,"td",38),e.BQk(),e.ynx(30,39),e.YNc(31,Wt,4,3,"td",40),e.BQk(),e.YNc(32,$t,1,3,"tr",41),e.YNc(33,jt,1,0,"tr",42),e.YNc(34,en,1,0,"tr",43),e.qZA(),e.qZA(),e._UZ(35,"mat-paginator",44),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.invoices)("ngClass",e.VKq(12,tn,""!==t.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(14,nn)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Ae=(()=>{class n{constructor(t,i,o,l,d,v,J){this.logger=t,this.store=i,this.decimalPipe=o,this.commonService=l,this.rtlEffects=d,this.datePipe=v,this.actions=J,this.calledFrom="transactions",this.faHistory=x.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["expires_at","msatoshi","actions"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","msatoshi_received","actions"]):(this.flgSticky=!0,this.displayedColumns=["expires_at","paid_at","description","msatoshi","msatoshi_received","actions"])}ngOnInit(){this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(h.gc).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.invoiceJSONArr=t.listInvoices.invoices||[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[3]),(0,D.h)(t=>t.type===s.sW.SET_LOOKUP_CL||t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.SET_LOOKUP_CL&&this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&t.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(t.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,L.qR)({payload:{data:{pageSize:this.pageSize,component:vt}}}))}onAddInvoice(t){this.invoiceValue||(this.invoiceValue=0);const i=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch((0,T.Rd)({payload:{label:this.newlyAddedInvoiceMemo,amount:1e3*this.invoiceValue,description:this.description,expiry:i,private:this.private}})),this.resetData()}onDeleteExpiredInvoices(){this.store.dispatch((0,L.c1)({payload:{data:{type:"CONFIRM",titleMessage:"Delete Expired Invoices",noBtnText:"Cancel",yesBtnText:"Delete Invoices"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[4])).subscribe(t=>{t&&this.store.dispatch((0,T.g6)({payload:null}))})}onInvoiceClick(t){this.store.dispatch((0,L.qR)({payload:{data:{invoice:{msatoshi:t.msatoshi,label:t.label,expires_at:t.expires_at,paid_at:t.paid_at,bolt11:t.bolt11,payment_hash:t.payment_hash,description:t.description,status:t.status,msatoshi_received:t.msatoshi_received},newlyAdded:!1,component:bt.$}}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[5])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,s.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onRefreshInvoice(t){this.store.dispatch((0,T.n7)({payload:t.label}))}updateInvoicesData(t){this.invoiceJSONArr=this.invoiceJSONArr.map(i=>i.label===t.label?t:i)}loadInvoicesTable(t){this.invoices=new r.by(t?[...t]:[]),this.invoices.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(i,o)=>((i.paid_at?this.datePipe.transform(new Date(1e3*i.paid_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.expires_at?this.datePipe.transform(new Date(1e3*i.expires_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.invoices.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(u.JJ),e.Y36(O.v),e.Y36(W.V),e.Y36(u.uU),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lightning-invoices-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("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",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","name","invoiceValue","type","number","tabindex","3",3,"ngModel","step","min","ngModelChange","keyup"],["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-stroked-button","","color","warn","tabindex","7","type","button",1,"mr-1",3,"click"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","expires_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","paid_at"],["matColumnDef","description"],["matColumnDef","msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_received"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Paid","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","Paid","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"],["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"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,St,15,5,"form",1),e.YNc(2,wt,5,0,"div",2),e.YNc(3,an,36,15,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,c.JJ,c.On,c.wV,c.qQ,X.q,g.R9,g.bx,U.lW,N.BN,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,Q.gM,u.PC,q.Zl,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],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}"]}),n})();var z=_(3453),se=_(9859),le=_(904);const on=["sendPaymentForm"],sn=["paymentAmt"],ln=["offerAmt"],rn=["paymentReq"],cn=["offerReq"];function un(n,a){if(1&n&&(e.TgZ(0,"mat-radio-button",22),e._uU(1,"Offer"),e.qZA()),2&n){const t=e.oxw(2);e.s9C("value",t.paymentTypes.OFFER)}}function pn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-radio-group",18),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().paymentType=o})("change",function(){return e.CHM(t),e.oxw().onPaymentTypeChange()}),e.TgZ(1,"mat-radio-button",19),e._uU(2,"Invoice"),e.qZA(),e.TgZ(3,"mat-radio-button",20),e._uU(4,"Keysend"),e.qZA(),e.YNc(5,un,2,1,"mat-radio-button",21),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngModel",t.paymentType),e.xp6(1),e.s9C("value",t.paymentTypes.INVOICE),e.xp6(2),e.s9C("value",t.paymentTypes.KEYSEND),e.xp6(2),e.Q6J("ngIf",t.selNode.enableOffers)}}function mn(n,a){1&n&&e.GkF(0)}function dn(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentError)}}function fn(n,a){if(1&n&&(e.TgZ(0,"div",23),e._UZ(1,"fa-icon",24),e.YNc(2,dn,2,1,"span",25),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.paymentError)}}function _n(n,a){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function hn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function gn(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Cn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment amount is required."),e.qZA())}function xn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",29,30),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).paymentAmount=o})("change",function(o){return e.CHM(t),e.oxw(2).onAmountChange(o)}),e.qZA(),e.TgZ(3,"mat-hint"),e._uU(4,"It is a zero amount invoice, enter amount to be paid."),e.qZA(),e.YNc(5,Cn,2,0,"mat-error",25),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.paymentAmount),e.xp6(4),e.Q6J("ngIf",!t.paymentAmount)}}function Tn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"textarea",26,27),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(3,_n,2,1,"mat-hint",25),e.YNc(4,hn,2,0,"mat-error",25),e.YNc(5,gn,2,1,"mat-error",25),e.qZA(),e.YNc(6,xn,6,2,"mat-form-field",28)}if(2&n){const t=e.MAs(2),i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.paymentRequest),e.xp6(2),e.Q6J("ngIf",i.paymentRequest&&""!==i.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!i.paymentRequest),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),e.xp6(1),e.Q6J("ngIf",i.zeroAmtInvoice)}}function yn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Pubkey is required."),e.qZA())}function Zn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Keysend amount is required."),e.qZA())}function An(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",31),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().pubkey=o}),e.qZA(),e.YNc(2,yn,2,0,"mat-error",25),e.qZA(),e.TgZ(3,"mat-form-field",1),e.TgZ(4,"input",32,33),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().keysendAmount=o}),e.qZA(),e.YNc(6,Zn,2,0,"mat-error",25),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.pubkey),e.xp6(1),e.Q6J("ngIf",!t.pubkey),e.xp6(2),e.Q6J("ngModel",t.keysendAmount),e.xp6(2),e.Q6J("ngIf",!t.keysendAmount)}}function Ln(n,a){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.offerDecodedHint)}}function vn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Offer request is required."),e.qZA())}function bn(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.offerDecodedHint)}}function Sn(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Offer amount is required."),e.qZA())}function wn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",38,39),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).offerAmount=o})("change",function(o){return e.CHM(t),e.oxw(2).onAmountChange(o)}),e.qZA(),e.TgZ(3,"mat-hint"),e._uU(4,"It is a zero amount offer, enter amount to be paid."),e.qZA(),e.YNc(5,Sn,2,0,"mat-error",25),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.offerAmount),e.xp6(4),e.Q6J("ngIf",!t.offerAmount)}}function qn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",40),e.TgZ(1,"input",41),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).offerTitle=o}),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.offerTitle)}}function Fn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"textarea",34,35),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(3,Ln,2,1,"mat-hint",25),e.YNc(4,vn,2,0,"mat-error",25),e.YNc(5,bn,2,1,"mat-error",25),e.qZA(),e.YNc(6,wn,6,2,"mat-form-field",28),e.TgZ(7,"div",1),e.TgZ(8,"mat-checkbox",36),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().flgSaveToDB=o}),e._uU(9,"Save/Update Offer"),e.qZA(),e.qZA(),e.YNc(10,qn,2,1,"mat-form-field",37)}if(2&n){const t=e.MAs(2),i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.offerRequest),e.xp6(2),e.Q6J("ngIf",i.offerRequest&&""!==i.offerDecodedHint),e.xp6(1),e.Q6J("ngIf",!i.offerRequest),e.xp6(1),e.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),e.xp6(1),e.Q6J("ngIf",i.zeroAmtOffer),e.xp6(2),e.Q6J("ngModel",i.flgSaveToDB)("matTooltipPosition","above"),e.xp6(2),e.Q6J("ngIf",i.flgSaveToDB||""!==i.offerTitle)}}let Le=(()=>{class n{constructor(t,i,o,l,d,v,J){this.dialogRef=t,this.data=i,this.store=o,this.logger=l,this.commonService=d,this.decimalPipe=v,this.actions=J,this.faExclamationTriangle=x.eHv,this.paymentTypes=s.IX,this.paymentType=s.IX.INVOICE,this.selNode={},this.offerDecoded={},this.offerRequest="",this.offerDecodedHint="",this.offerDescription="",this.offerVendor="",this.offerTitle="",this.zeroAmtOffer=!1,this.offerInvoice=null,this.offerAmount=null,this.offerUUID=null,this.flgSaveToDB=!1,this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentAmount=null,this.pubkey="",this.keysendAmount=null,this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=s.Vc[0],this.feeLimitTypes=s.Vc,this.paymentError="",this.isCompatibleVersion=!1,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}set payReq(t){t&&(this.paymentReq=t)}set offrReq(t){t&&(this.offerReq=t)}ngOnInit(){if(this.data&&this.data.paymentType)switch(this.paymentType=this.data.paymentType,this.paymentType){case s.IX.INVOICE:this.paymentRequest=this.data.invoiceBolt11;break;case s.IX.KEYSEND:this.pubkey=this.data.pubkeyKeysend;break;case s.IX.OFFER:this.onPaymentRequestEntry(this.data.offerBolt12),this.offerTitle=this.data.offerTitle,this.offerUUID=this.data.offerUUId,this.flgSaveToDB=!1}this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.isCompatibleVersion=this.commonService.isVersionCompatible(t.version,"0.9.0")&&this.commonService.isVersionCompatible(t.api_version,"0.4.0")}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.activeChannels=t.activeChannels,this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[3]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL||t.type===s.sW.SEND_PAYMENT_STATUS_CL||t.type===s.sW.SET_DECODED_PAYMENT_CL||t.type===s.sW.SET_OFFER_INVOICE_CL)).subscribe(t=>{t.type===s.sW.SEND_PAYMENT_STATUS_CL&&this.dialogRef.close(),t.type===s.sW.SET_DECODED_PAYMENT_CL&&(this.paymentType===s.IX.INVOICE?"bolt12 offer"===t.payload.type&&t.payload.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=t.payload,this.setPaymentDecodedDetails()):this.paymentType===s.IX.OFFER&&("bolt11 invoice"===t.payload.type&&t.payload.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=t.payload,this.setOfferDecodedDetails()))),t.type===s.sW.SET_OFFER_INVOICE_CL&&(this.offerInvoice=t.payload,this.sendPayment()),t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&("SendPayment"===t.payload.action&&(delete this.paymentDecoded.msatoshi,this.paymentError=t.payload.message),"DecodePayment"===t.payload.action&&(this.paymentType===s.IX.INVOICE&&(this.paymentDecodedHint="ERROR: "+t.payload.message,this.paymentReq.control.setErrors({decodeError:!0})),this.paymentType===s.IX.OFFER&&(this.offerDecodedHint="ERROR: "+t.payload.message,this.offerReq.control.setErrors({decodeError:!0}))),"FetchOfferInvoice"===t.payload.action&&this.paymentType===s.IX.OFFER&&(this.paymentError=t.payload.message))})}onSendPayment(){switch(this.paymentType){case s.IX.KEYSEND:if(!this.pubkey||""===this.pubkey.trim()||!this.keysendAmount||this.keysendAmount<=0)return!0;this.keysendPayment();break;case s.IX.INVOICE:if(!this.paymentRequest||this.zeroAmtInvoice&&(0===this.paymentAmount||!this.paymentAmount))return this.paymentReq.control.markAsTouched(),this.paymentAmt.control.markAsTouched(),!0;this.paymentDecoded.created_at?this.sendPayment():(this.resetInvoiceDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!0}})));break;case s.IX.OFFER:if(!this.offerRequest||this.zeroAmtOffer&&(0===this.offerAmount||!this.offerAmount))return this.offerReq.control.markAsTouched(),this.offerAmt.control.markAsTouched(),!0;this.offerDecoded.offer_id?this.sendPayment():(this.resetOfferDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.offerRequest,fromDialog:!0}})))}}keysendPayment(){this.store.dispatch((0,T.oV)({payload:{uiMessage:s.m6.SEND_KEYSEND,paymentType:s.IX.KEYSEND,pubkey:this.pubkey,amount:1e3*this.keysendAmount,fromDialog:!0}}))}sendPayment(){this.paymentType===s.IX.INVOICE?this.store.dispatch((0,T.oV)(this.zeroAmtInvoice?{payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!0}})):this.paymentType===s.IX.OFFER&&this.store.dispatch(this.offerInvoice?(0,T.oV)({payload:{uiMessage:s.m6.SEND_OFFER,paymentType:s.IX.OFFER,invoice:this.offerInvoice.invoice,saveToDB:this.flgSaveToDB,offerUUID:this.offerUUID,offerBolt12:this.offerRequest,amount:1e3*this.offerAmount,title:this.offerTitle,vendor:this.offerVendor,description:this.offerDescription,fromDialog:!0}}):(0,T.eM)(this.zeroAmtOffer?{payload:{offer:this.offerRequest,msatoshi:1e3*this.offerAmount}}:{payload:{offer:this.offerRequest}}))}onPaymentRequestEntry(t){this.paymentType===s.IX.INVOICE?(this.paymentRequest=t,this.paymentRequest&&this.paymentRequest.length>100&&(this.resetInvoiceDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!0}})))):this.paymentType===s.IX.OFFER&&(this.offerRequest=t,this.offerRequest&&this.offerRequest.length>100&&(this.resetOfferDetails(),this.store.dispatch((0,T.is)({payload:{routeParam:this.offerRequest,fromDialog:!0}}))))}resetOfferDetails(){this.offerInvoice=null,this.offerAmount=null,this.offerDecodedHint="",this.zeroAmtOffer=!1,this.flgSaveToDB=!1,this.paymentError="",this.offerReq&&this.offerReq.control.setErrors(null)}resetInvoiceDetails(){this.paymentAmount=null,this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentError="",this.paymentReq&&this.paymentReq.control.setErrors(null)}onAmountChange(t){this.paymentType===s.IX.INVOICE&&(delete this.paymentDecoded.msatoshi,this.paymentDecoded.msatoshi=+t.target.value),this.paymentType===s.IX.OFFER&&(delete this.offerDecoded.amount,delete this.offerDecoded.amount_msat,this.offerDecoded.amount=1e3*+t.target.value,this.offerDecoded.amount_msat=t.target.value+"msat")}onPaymentTypeChange(){this.paymentError="",this.paymentDecodedHint="",this.offerDecodedHint="",this.offerInvoice=null}setOfferDecodedDetails(){this.offerDecoded.offer_id&&!this.offerDecoded.amount_msat?(this.offerDecoded.amount_msat="0msat",this.offerDecoded.amount=0,this.zeroAmtOffer=!0,this.offerDecodedHint="Zero Amount Offer | Description: "+this.offerDecoded.description):(this.zeroAmtOffer=!1,this.offerDecoded.amount=+(this.offerDecoded.amount||this.offerDecoded.amount_msat.slice(0,-4)),this.offerAmount=this.offerDecoded.amount?this.offerDecoded.amount/1e3:0,this.offerDescription=this.offerDecoded.description,this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.selNode.fiatConversion?this.commonService.convertCurrency(this.offerAmount,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[5])).subscribe({next:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,s.Xz.OTHER)+") | Description: "+this.offerDecoded.description},error:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description+". Unable to convert currency."}}):this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description)}setPaymentDecodedDetails(){this.paymentDecoded.created_at&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[6])).subscribe({next:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,s.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description)}resetData(){switch(this.paymentType){case s.IX.KEYSEND:this.pubkey="",this.keysendAmount=null;break;case s.IX.INVOICE:this.paymentRequest="",this.paymentDecoded={},this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=s.Vc[0],this.resetInvoiceDetails();break;case s.IX.OFFER:this.offerRequest="",this.offerDecoded={},this.resetOfferDetails()}this.paymentError=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(F.mQ),e.Y36(O.v),e.Y36(u.JJ),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lightning-send-payments"]],viewQuery:function(t,i){if(1&t&&(e.Gf(on,5),e.Gf(sn,5),e.Gf(ln,5),e.Gf(rn,5),e.Gf(cn,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.paymentAmt=o.first),e.iGM(o=e.CRH())&&(i.offerAmt=o.first),e.iGM(o=e.CRH())&&(i.payReq=o.first),e.iGM(o=e.CRH())&&(i.offrReq=o.first)}},decls:25,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","12","fxFlex","10","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","my-1","color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",3,"ngModel","ngModelChange","change",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","column",3,"submit","reset"],["sendPaymentForm","ngForm"],[4,"ngTemplateOutlet"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","9","type","reset",1,"mr-1"],["mat-button","","color","primary","type","submit","tabindex","8"],["invoiceBlock",""],["keysendBlock",""],["offerBlock",""],["color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",1,"my-1",3,"ngModel","ngModelChange","change"],["fxFlex","20","tabindex","1",3,"value"],["fxFlex","20","tabindex","2",3,"value"],["fxFlex","20","tabindex","3",3,"value",4,"ngIf"],["fxFlex","20","tabindex","3",3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"],["autoFocus","","matInput","","placeholder","Payment Request","rows","4","name","paymentRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],["fxFlex","100",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["autoFocus","","matInput","","placeholder","Pubkey","name","pubkey","tabindex","4","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Amount (Sats)","name","keysendAmount","tabindex","5","required","",3,"ngModel","ngModelChange"],["keysendAmt","ngModel"],["autoFocus","","matInput","","placeholder","Offer Request","rows","4","name","offerRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["offerReq","ngModel"],["fxFlex","30","tabindex","6","color","primary","matTooltip","Save or update offer in database for future payments",1,"mt-1",3,"ngModel","matTooltipPosition","ngModelChange"],["fxFlex","100","class","mt-1",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amountoffer","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["offerAmt","ngModel"],["fxFlex","100",1,"mt-1"],["matInput","","placeholder","Title to Save","tabindex","7",3,"ngModel","ngModelChange"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Send Payment"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.YNc(9,pn,6,4,"mat-radio-group",7),e.TgZ(10,"form",8,9),e.NdJ("submit",function(){return i.onSendPayment()})("reset",function(){return i.resetData()}),e.YNc(12,mn,1,0,"ng-container",10),e.YNc(13,fn,3,2,"div",11),e.TgZ(14,"div",12),e.TgZ(15,"button",13),e._uU(16,"Clear Fields"),e.qZA(),e.TgZ(17,"button",14),e._uU(18,"Send Payment"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(19,Tn,7,5,"ng-template",null,15,e.W1O),e.YNc(21,An,7,4,"ng-template",null,16,e.W1O),e.YNc(23,Fn,11,8,"ng-template",null,17,e.W1O)),2&t){const o=e.MAs(20),l=e.MAs(22),d=e.MAs(24);e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(3),e.Q6J("ngIf",i.isCompatibleVersion),e.xp6(3),e.Q6J("ngTemplateOutlet",i.paymentType===i.paymentTypes.KEYSEND?l:i.paymentType===i.paymentTypes.OFFER?d:o),e.xp6(1),e.Q6J("ngIf",""!==i.paymentError)}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,u.O5,c._Y,c.JL,c.F,u.tP,se.VQ,c.JJ,c.On,se.U0,N.BN,g.KE,I.Nt,c.Fj,V.h,c.Q7,g.bx,g.TO,le.oG,Q.gM],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}"]}),n})();var re=_(5864);const On=["sendPaymentForm"];function Rn(n,a){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Un(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function Nn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5),e.TgZ(2,"mat-form-field",6),e.TgZ(3,"textarea",7,8),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(5,Rn,2,1,"mat-hint",9),e.YNc(6,Un,2,0,"mat-error",9),e.qZA(),e.TgZ(7,"div",10),e.TgZ(8,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(9,"Clear Field"),e.qZA(),e.TgZ(10,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendPayment()}),e._uU(11,"Send Payment"),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.paymentRequest),e.xp6(2),e.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!t.paymentRequest)}}function kn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",13),e.TgZ(1,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().openSendPaymentModal()}),e._uU(2,"Send Payment"),e.qZA(),e.qZA()}}function In(n,a){1&n&&e._UZ(0,"mat-progress-bar",47)}function Mn(n,a){1&n&&(e.TgZ(0,"th",48),e._uU(1,"Created At"),e.qZA())}const $=function(n){return{"mr-0":n}};function En(n,a){if(1&n&&e._UZ(0,"span",52),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function Dn(n,a){if(1&n&&e._UZ(0,"span",53),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function Pn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.YNc(1,En,1,3,"span",50),e.YNc(2,Dn,1,3,"span",51),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf","complete"===t.status),e.xp6(1),e.Q6J("ngIf","complete"!==t.status),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*(null==t?null:t.created_at),"dd/MMM/YYYY HH:mm")," ")}}function Jn(n,a){1&n&&(e.TgZ(0,"th",48),e._uU(1,"Payment Hash"),e.qZA())}function Qn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"div"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(null==t?null:t.payment_hash)}}function Yn(n,a){1&n&&(e.TgZ(0,"th",54),e._uU(1,"Sats Sent"),e.qZA())}function Bn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",55),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0"))}}function Hn(n,a){1&n&&(e.TgZ(0,"th",54),e._uU(1,"Sats Received"),e.qZA())}function Vn(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",55),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"))}}function zn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",56),e.TgZ(1,"div",57),e.TgZ(2,"mat-select",58),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",59),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Gn(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",60),e.TgZ(1,"button",61),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onPaymentClick(l)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function Xn(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No payment available."),e.qZA())}function Wn(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting payments..."),e.qZA())}function Kn(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function $n(n,a){if(1&n&&(e.TgZ(0,"td",62),e.YNc(1,Xn,2,0,"p",9),e.YNc(2,Wn,2,0,"p",9),e.YNc(3,Kn,2,1,"p",9),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function jn(n,a){if(1&n&&e._UZ(0,"span",66),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ei(n,a){if(1&n&&e._UZ(0,"span",67),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ti(n,a){if(1&n&&e._UZ(0,"span",66),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ni(n,a){if(1&n&&e._UZ(0,"span",67),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,$,t.screenSize===t.screenSizeEnum.XS))}}function ii(n,a){if(1&n&&(e.TgZ(0,"span",69),e.YNc(1,ti,1,3,"span",64),e.YNc(2,ni,1,3,"span",65),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf","complete"===t.status),e.xp6(1),e.Q6J("ngIf","complete"!==t.status),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*t.created_at,"dd/MMM/YYYY HH:mm")," ")}}function ai(n,a){if(1&n&&(e.ynx(0),e.YNc(1,ii,5,6,"span",68),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function oi(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",63),e.YNc(2,jn,1,3,"span",64),e.YNc(3,ei,1,3,"span",65),e._uU(4),e.qZA(),e.YNc(5,ai,2,1,"ng-container",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Q6J("ngIf","complete"===t.status),e.xp6(1),e.Q6J("ngIf","complete"!==t.status),e.xp6(1),e.hij(" Total Attempts: ",null==t?null:t.total_parts," "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function si(n,a){if(1&n&&(e.TgZ(0,"span",63),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" Part ID ",t.partid?t.partid:0," ")}}function li(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,si,2,1,"span",70),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function ri(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",63),e._uU(2),e.qZA(),e.YNc(3,li,2,1,"span",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(null==t?null:t.payment_hash),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function ci(n,a){if(1&n&&(e.TgZ(0,"span",71),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.msatoshi_sent/1e3,t.msatoshi_sent<1e3?"1.0-4":"1.0-0")," ")}}function ui(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,ci,3,4,"span",72),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function pi(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",71),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,ui,2,1,"span",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0")),e.xp6(2),e.Q6J("ngIf",t.is_expanded)}}function mi(n,a){if(1&n&&(e.TgZ(0,"span",71),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0")," ")}}function di(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,mi,3,4,"span",72),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function fi(n,a){if(1&n&&(e.TgZ(0,"td",49),e.TgZ(1,"span",71),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,di,2,1,"span",9),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0")),e.xp6(2),e.Q6J("ngIf",t.is_expanded)}}function _i(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",55),e.TgZ(1,"button",76),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(4).onPaymentClick(l)}),e._uU(2),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit;e.xp6(2),e.hij("View ",t.partid?t.partid:0,"")}}function hi(n,a){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,_i,3,1,"div",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.mpps)}}function gi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",73),e.TgZ(1,"span",55),e.TgZ(2,"button",74),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return l.is_expanded=!l.is_expanded}),e._uU(3),e.qZA(),e.qZA(),e.YNc(4,hi,2,1,"div",9),e.qZA()}if(2&n){const t=a.$implicit;e.xp6(3),e.Oqu(t.is_expanded?"Hide":"Show"),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Ci(n,a){1&n&&e._UZ(0,"tr",77)}const xi=function(n){return{"display-none":n}};function Ti(n,a){if(1&n&&e._UZ(0,"tr",78),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,xi,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function yi(n,a){1&n&&e._UZ(0,"tr",79)}function Zi(n,a){1&n&&e._UZ(0,"tr",77)}const Ai=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Li=function(){return["no_payment"]};function vi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",14),e.TgZ(1,"div",15),e.TgZ(2,"div",16),e._UZ(3,"fa-icon",17),e.TgZ(4,"span",18),e._uU(5,"Payments History"),e.qZA(),e.qZA(),e.TgZ(6,"mat-form-field",19),e.TgZ(7,"input",20),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",21),e.YNc(9,In,1,0,"mat-progress-bar",22),e.TgZ(10,"table",23,24),e.ynx(12,25),e.YNc(13,Mn,2,0,"th",26),e.YNc(14,Pn,5,6,"td",27),e.BQk(),e.ynx(15,28),e.YNc(16,Jn,2,0,"th",26),e.YNc(17,Qn,3,1,"td",27),e.BQk(),e.ynx(18,29),e.YNc(19,Yn,2,0,"th",30),e.YNc(20,Bn,4,4,"td",27),e.BQk(),e.ynx(21,31),e.YNc(22,Hn,2,0,"th",30),e.YNc(23,Vn,4,4,"td",27),e.BQk(),e.ynx(24,32),e.YNc(25,zn,6,0,"th",33),e.YNc(26,Gn,3,0,"td",34),e.BQk(),e.ynx(27,35),e.YNc(28,$n,4,3,"td",36),e.BQk(),e.ynx(29,37),e.YNc(30,oi,6,4,"td",27),e.BQk(),e.ynx(31,38),e.YNc(32,ri,4,2,"td",27),e.BQk(),e.ynx(33,39),e.YNc(34,pi,5,5,"td",27),e.BQk(),e.ynx(35,40),e.YNc(36,fi,5,5,"td",27),e.BQk(),e.ynx(37,41),e.YNc(38,gi,5,2,"td",42),e.BQk(),e.YNc(39,Ci,1,0,"tr",43),e.YNc(40,Ti,1,3,"tr",44),e.YNc(41,yi,1,0,"tr",45),e.YNc(42,Zi,1,0,"tr",43),e.qZA(),e.qZA(),e._UZ(43,"mat-paginator",46),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.payments)("ngClass",e.VKq(15,Ai,""!==t.errorMessage)),e.xp6(29),e.Q6J("matRowDefColumns",t.mppColumns)("matRowDefWhen",t.is_group),e.xp6(1),e.Q6J("matFooterRowDef",e.DdM(17,Li)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)("matRowDefWhen",!t.is_group),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let ve=(()=>{class n{constructor(t,i,o,l,d,v,J,A){this.logger=t,this.commonService=i,this.store=o,this.rtlEffects=l,this.clEffects=d,this.decimalPipe=v,this.titleCasePipe=J,this.datePipe=A,this.calledFrom="transactions",this.faHistory=x.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.displayedColumns=[],this.mppColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["created_at","actions"],this.mppColumns=["groupTotal","groupAction"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtRecv","groupAction"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtSent","groupAmtRecv","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["created_at","payment_hash","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupHash","groupAmtSent","groupAmtRecv","groupAction"])}ngOnInit(){this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(h.PP).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paymentJSONArr=t.payments||[],this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr)}is_group(t,i){return i.is_group}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.created_at?this.sendPayment():(this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!1}})),this.clEffects.setDecodedPaymentCL.pipe((0,z.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at?(this.paymentDecoded.msatoshi||(this.paymentDecoded.msatoshi=0),this.sendPayment()):this.resetData()}))}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.msatoshi&&0!==this.paymentDecoded.msatoshi?(this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:50,type:s.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.msatoshi/1e3,title:"Amount (Sats)",width:50,type:s.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:s.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,z.q)(1)).subscribe(i=>{i&&(this.store.dispatch((0,T.oV)({payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:40,type:s.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:s.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,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:s.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,z.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.msatoshi=o[0].inputValue,this.store.dispatch((0,T.oV)({payload:{uiMessage:s.m6.SEND_PAYMENT,paymentType:s.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*o[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&(this.store.dispatch((0,T.is)({payload:{routeParam:this.paymentRequest,fromDialog:!1}})),this.clEffects.setDecodedPaymentCL.subscribe(i=>{this.paymentDecoded=i,this.paymentDecoded.msatoshi?this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,s.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description}))}openSendPaymentModal(){this.store.dispatch((0,L.qR)({payload:{data:{component:Le}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}onPaymentClick(t){const i=[[{key:"bolt11",value:t.bolt11,title:"Bolt 11",width:100,type:s.Gi.STRING}],[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:s.Gi.STRING}],[{key:"id",value:t.id,title:"ID",width:20,type:s.Gi.STRING},{key:"destination",value:t.destination,title:"Destination",width:80,type:s.Gi.STRING}],[{key:"created_at",value:t.created_at,title:"Creation Date",width:50,type:s.Gi.DATE_TIME},{key:"status",value:this.titleCasePipe.transform(t.status),title:"Status",width:50,type:s.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"Amount (mSats)",width:50,type:s.Gi.NUMBER},{key:"msatoshi_sent",value:t.msatoshi_sent,title:"Amount Sent (mSats)",width:50,type:s.Gi.NUMBER}]];t.memo&&""!==t.memo&&i.splice(2,0,[{key:"memo",value:t.memo,title:"Memo",width:100,type:s.Gi.STRING}]),t.hasOwnProperty("partid")?i.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:80,type:s.Gi.STRING},{key:"partid",value:t.partid,title:"Part ID",width:20,type:s.Gi.STRING}]):i.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:s.Gi.STRING}]),this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Payment Information",message:i}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}loadPaymentsTable(t){this.payments=new r.by(t?[...t]:[]),this.payments.data=this.paymentJSONArr,this.payments.sort=this.sort,this.payments.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.payments.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.payments.filterPredicate=(i,o)=>((i.created_at?this.datePipe.transform(new Date(1e3*i.created_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.payments.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const i=JSON.parse(JSON.stringify(this.payments.data)).reduce((o,l)=>l.mpps?o.concat(l.mpps):(delete l.is_group,delete l.is_expanded,delete l.total_parts,o.concat(l)),[]);this.commonService.downloadFile(i,"Payments")}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(W.V),e.Y36(re.s),e.Y36(u.JJ),e.Y36(u.rS),e.Y36(u.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lightning-payments"]],viewQuery:function(t,i){if(1&t&&(e.Gf(On,5),e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","created_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","payment_hash"],["matColumnDef","msatoshi_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["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","groupHash"],["matColumnDef","groupAmtSent"],["matColumnDef","groupAmtRecv"],["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"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["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,"mpp-row-span"],["class","dot green mt-0","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow mt-0","matTooltip","Incomplete/Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green","mt-0",3,"ngClass"],["matTooltip","Incomplete/Failed","matTooltipPosition","right",1,"dot","yellow","mt-0",3,"ngClass"],["fxLayoutAlign","start center","class","mpp-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"mpp-row-span","pl-3"],["fxLayoutAlign","start center","class","mpp-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"mpp-row-span"],["fxLayoutAlign","end center","class","mpp-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-mpp-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-mpp-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Nn,12,3,"form",1),e.YNc(2,kn,3,0,"div",2),e.YNc(3,vi,44,18,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,c.Q7,Y.$V,c.JJ,c.On,U.lW,g.bx,g.TO,N.BN,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.nj,r.Ke,r.as,S.NW,P.pW,r.ge,y.nU,r.ev,Q.gM,R.gD,R.$L,B.ey,r.yh,u.sg,r.Gk,r.Q2,r.XQ],pipes:[u.uU,u.JJ],styles:[".mat-column-bolt11[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.mpp-row-span[_ngcontent-%COMP%]{min-height:4.2rem}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"]}),n})();function bi(n,a){if(1&n&&(e.TgZ(0,"button",26),e.TgZ(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA(),e.qZA()),2&n){e.oxw();const t=e.MAs(11);e.Q6J("matMenuTriggerFor",t)}}function Si(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).onNavigateTo("/cl/reports")}),e._uU(1,"Fees Summary"),e.qZA()}}function wi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).onsortChannelsBy()}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw(3);e.xp6(1),e.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}function qi(n,a){1&n&&e._UZ(0,"mat-progress-bar",27)}function Fi(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",28),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Oi(n,a){if(1&n&&e._UZ(0,"rtl-cl-balances-info",29),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function Ri(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-capacity-info",30),2&n){const t=e.oxw(3);e.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("activeChannels",t.activeChannelsCapacity)("errorMessage",t.errorMessages[4]+" "+t.errorMessages[3])}}function Ui(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-info",31),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[4]+" "+t.errorMessages[5])}}function Ni(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-status-info",32),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[3])}}function ki(n,a){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const be=function(n){return{"dashboard-card-content":!0,"error-border":n}};function Ii(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-grid-tile",8),e.TgZ(1,"mat-card",9),e.TgZ(2,"mat-card-header"),e.TgZ(3,"mat-card-title",10),e.TgZ(4,"div"),e._UZ(5,"fa-icon",11),e.TgZ(6,"span"),e._uU(7),e.qZA(),e.qZA(),e.TgZ(8,"div"),e.YNc(9,bi,3,1,"button",12),e.TgZ(10,"mat-menu",13,14),e.TgZ(12,"button",15),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onNavigateTo(l.link)}),e._uU(13),e.qZA(),e.YNc(14,Si,2,0,"button",16),e.YNc(15,wi,2,1,"button",16),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(16,"mat-card-content",17),e.YNc(17,qi,1,0,"mat-progress-bar",18),e.TgZ(18,"div",19),e.YNc(19,Fi,1,2,"rtl-cl-node-info",20),e.YNc(20,Oi,1,2,"rtl-cl-balances-info",21),e.YNc(21,Ri,1,4,"rtl-cl-channel-capacity-info",22),e.YNc(22,Ui,1,2,"rtl-cl-fee-info",23),e.YNc(23,Ni,1,2,"rtl-cl-channel-status-info",24),e.YNc(24,ki,2,0,"h3",25),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(5),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.link),e.xp6(4),e.hij("Go To ",t.goTo,""),e.xp6(1),e.Q6J("ngIf","fee"===t.id),e.xp6(1),e.Q6J("ngIf","capacity"===t.id),e.xp6(1),e.s9C("fxFlex","capacity"===t.id?90:70),e.Q6J("ngClass",e.VKq(17,be,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"capacity"===t.id&&(i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.ERROR)||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR))),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"capacity"===t.id&&(i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.INITIATED)||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","capacity"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","status")}}function Mi(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e._UZ(2,"fa-icon",4),e.TgZ(3,"span",5),e._uU(4),e.qZA(),e.qZA(),e.TgZ(5,"mat-grid-list",6),e.YNc(6,Ii,25,19,"mat-grid-tile",7),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("icon",t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.ERROR?t.faFrown:t.faSmile),e.xp6(2),e.Oqu(t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.COMPLETED?"Welcome "+t.information.alias+"! Your node is up and running.":t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),e.xp6(1),e.Q6J("rowHeight",t.operatorCardHeight),e.xp6(1),e.Q6J("ngForOf",t.operatorCards)}}function Ei(n,a){if(1&n&&(e.TgZ(0,"button",26),e.TgZ(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA(),e.qZA()),2&n){e.oxw();const t=e.MAs(9);e.Q6J("matMenuTriggerFor",t)}}function Di(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-card-header"),e.TgZ(1,"mat-card-title",10),e.TgZ(2,"div"),e._UZ(3,"fa-icon",11),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"div"),e.YNc(7,Ei,3,1,"button",12),e.TgZ(8,"mat-menu",13,41),e.TgZ(10,"button",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw(2).onNavigateTo(o.link)}),e._uU(11),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw().$implicit;e.xp6(3),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.link),e.xp6(4),e.hij("Go To ",t.goTo,"")}}function Pi(n,a){1&n&&e._UZ(0,"mat-progress-bar",27)}function Ji(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",42),2&n){const t=e.oxw(3);e.Q6J("information",t.information)}}function Qi(n,a){if(1&n&&e._UZ(0,"rtl-cl-balances-info",29),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function Yi(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-liquidity-info",43),2&n){const t=e.oxw(3);e.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("activeChannels",t.allInboundChannels)("errorMessage",t.errorMessages[4])}}function Bi(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-liquidity-info",43),2&n){const t=e.oxw(3);e.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("activeChannels",t.allOutboundChannels)("errorMessage",t.errorMessages[4])}}function Hi(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",52),e.TgZ(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA(),e.qZA(),e.TgZ(3,"mat-menu",13,53),e.TgZ(5,"button",15),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).$implicit;return e.oxw(2).onNavigateTo(o.link)}),e._uU(6),e.qZA(),e.TgZ(7,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw(4).onNavigateTo("/cl/reports/transactions")}),e._uU(8,"Transactions Summary"),e.qZA(),e.qZA()}if(2&n){const t=e.MAs(4),i=e.oxw(2).$implicit;e.Q6J("matMenuTriggerFor",t),e.xp6(6),e.hij("Go To ",i.goTo,"")}}function Vi(n,a){1&n&&(e.TgZ(0,"span",44),e.TgZ(1,"mat-tab-group",45),e.TgZ(2,"mat-tab",46),e._UZ(3,"rtl-cl-lightning-invoices-table",47),e.qZA(),e.TgZ(4,"mat-tab",48),e._UZ(5,"rtl-cl-lightning-payments",49),e.qZA(),e.TgZ(6,"mat-tab",50),e.YNc(7,Hi,9,2,"ng-template",51),e.qZA(),e.qZA(),e.qZA()),2&n&&(e.xp6(3),e.Q6J("calledFrom","home"),e.xp6(2),e.Q6J("calledFrom","home"),e.xp6(1),e.Q6J("disabled",!0))}function zi(n,a){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const Gi=function(n){return{"p-0":n}};function Xi(n,a){if(1&n&&(e.TgZ(0,"mat-grid-tile",8),e.TgZ(1,"mat-card",35),e.YNc(2,Di,12,4,"mat-card-header",36),e.TgZ(3,"mat-card-content",37),e.YNc(4,Pi,1,0,"mat-progress-bar",18),e.TgZ(5,"div",19),e.YNc(6,Ji,1,1,"rtl-cl-node-info",38),e.YNc(7,Qi,1,2,"rtl-cl-balances-info",21),e.YNc(8,Yi,1,4,"rtl-cl-channel-liquidity-info",39),e.YNc(9,Bi,1,4,"rtl-cl-channel-liquidity-info",39),e.YNc(10,Vi,8,3,"span",40),e.YNc(11,zi,2,0,"h3",25),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(1),e.Q6J("ngClass",e.VKq(13,Gi,"transactions"===t.id)),e.xp6(1),e.Q6J("ngIf","transactions"!==t.id),e.xp6(1),e.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),e.Q6J("ngClass",e.VKq(15,be,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===t.id&&(i.apiCallStatusBalance.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","inboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","outboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","transactions")}}function Wi(n,a){if(1&n&&(e.TgZ(0,"div",33),e._UZ(1,"fa-icon",4),e.TgZ(2,"span",5),e._uU(3),e.qZA(),e.qZA(),e.TgZ(4,"mat-grid-list",34),e.YNc(5,Xi,12,17,"mat-grid-tile",7),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faSmile),e.xp6(2),e.hij("Welcome ",t.information.alias,"! Your node is up and running."),e.xp6(1),e.Q6J("rowHeight",t.merchantCardHeight),e.xp6(1),e.Q6J("ngForOf",t.merchantCards)}}let Ki=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.store=i,this.actions=o,this.commonService=l,this.router=d,this.faSmile=Ce.I3,this.faFrown=Ce.Kf,this.faAngleDoubleDown=x.Sbq,this.faAngleDoubleUp=x.Vfw,this.faChartPie=x.OS1,this.faBolt=x.BDt,this.faServer=x.xf3,this.faNetworkWired=x.kXW,this.userPersonaEnum=s.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.totalBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.activeChannels=[],this.channelsStatus={active:{},pending:{},inactive:{}},this.activeChannelsCapacity=[],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.errorMessages=["","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusFees=null,this.apiCallStatusBalance=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFHistory=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:6,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:3,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:2,rows:5}])}ngOnInit(){this.store.select(h.Hz).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.errorMessages[5]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusFHistory=t.apisCallStatus[1],this.apiCallStatusNodeInfo.status===s.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.apiCallStatusFHistory.status===s.Bn.ERROR&&(this.errorMessages[5]="object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(h.JG).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===s.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===s.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.activeChannels=t.activeChannels,this.activeChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels,"balancedness")))||[],this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(i=>i.msatoshi_to_them>0),"msatoshi_to_them")))||[],this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(i=>i.msatoshi_to_us>0),"msatoshi_to_us")))||[],this.activeChannels.forEach(i=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(i.msatoshi_to_them/1e3),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(i.msatoshi_to_us/1e3)}),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.logger.info(t)}),this.store.select(h.Rn).pipe((0,f.R)(this.unSubs[3]),(0,ie.M)(this.store.select(h.Wj))).subscribe(([t,i])=>{this.errorMessages[2]="",this.apiCallStatusBalance=t.apiCallStatus,this.apiCallStatusBalance.status===s.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusBalance.message?JSON.stringify(this.apiCallStatusBalance.message):this.apiCallStatusBalance.message),this.errorMessages[3]="",this.apiCallStatusLRBal=i.apiCallStatus,this.apiCallStatusLRBal.status===s.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message),this.totalBalance=t.balance,this.balances.onchain=t.balance.totalBalance,this.balances.lightning=i.localRemoteBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const o=i.localRemoteBalance.localBalance?+i.localRemoteBalance.localBalance:0,l=i.localRemoteBalance.remoteBalance?+i.localRemoteBalance.remoteBalance:0;this.channelBalances={localBalance:o,remoteBalance:l,balancedness:+(1-Math.abs((o-l)/(o+l))).toFixed(3)},this.channelsStatus.active.capacity=i.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=i.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=i.localRemoteBalance.inactiveBalance||0,this.logger.info(t),this.logger.info(i)})}onNavigateTo(t){this.router.navigateByUrl(t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.activeChannelsCapacity=this.activeChannels.sort((t,i)=>{const o=+t.msatoshi_to_us+ +t.msatoshi_to_them,l=+i.msatoshi_to_them+ +i.msatoshi_to_them;return o>l?-1:o{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(H.eX),e.Y36(O.v),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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",3,"fxFlex","ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"balances","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","activeChannels","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"balances","errorMessage"],["fxFlex","100",3,"sortBy","channelBalances","activeChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["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",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage"],["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,i){if(1&t&&(e.YNc(0,Mi,7,4,"div",0),e.YNc(1,Wi,6,4,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,N.BN,ae.Il,u.sg,ae.DX,Z.a8,p.yH,Z.dk,Z.n5,ue.VK,ue.OP,Z.dn,u.mk,q.oO,u.RF,u.n9,u.ED,U.lW,ue.p6,pe.Hw,P.pW,Te,je,ot,ye,Ze,yt,k.SP,k.uX,Ae,ve,k.uD],styles:[""]}),n})();var $i=_(2331),ji=_(5533),Se=_(4084),j=_(9966),ee=_(3050),K=_(4290);const ea=["form"],ta=["formSweepAll"],na=["stepper"];function ia(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function aa(n,a){1&n&&(e.TgZ(0,"mat-hint"),e._uU(1,"Amount replaced by UTXO balance"),e.qZA())}function oa(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.amountError)}}function sa(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function la(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function ra(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function ca(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",39),e.TgZ(1,"input",40,41),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).customFeeRate=o}),e.qZA(),e.YNc(3,ra,2,0,"mat-error",14),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),e.xp6(2),e.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function ua(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function pa(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",e.lcZ(2,2,t.value)," Sats")}}function ma(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",23),e.TgZ(1,"mat-expansion-panel",42),e.NdJ("closed",function(){return e.CHM(t),e.oxw(2).onAdvancedPanelToggle(!0)})("opened",function(){return e.CHM(t),e.oxw(2).onAdvancedPanelToggle(!1)}),e.TgZ(2,"mat-expansion-panel-header"),e.TgZ(3,"mat-panel-title"),e.TgZ(4,"span"),e._uU(5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(6,"div",22),e.TgZ(7,"div",43),e.TgZ(8,"mat-form-field",44),e.TgZ(9,"mat-select",45),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw(2).onUTXOSelectionChange(o)})("valueChange",function(o){return e.CHM(t),e.oxw(2).selUTXOs=o}),e.TgZ(10,"mat-select-trigger"),e._uU(11),e.ALo(12,"number"),e.qZA(),e.YNc(13,pa,3,4,"mat-option",21),e.qZA(),e.qZA(),e.TgZ(14,"mat-slide-toggle",46),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).flgUseAllBalance=o})("change",function(){return e.CHM(t),e.oxw(2).onUTXOAllBalanceChange()}),e._uU(15," Use selected UTXOs balance "),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(5),e.Oqu(t.advancedTitle),e.xp6(4),e.Q6J("value",t.selUTXOs),e.xp6(2),e.AsE("",e.lcZ(12,7,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),e.xp6(2),e.Q6J("ngForOf",t.utxos),e.xp6(1),e.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function da(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function fa(n,a){if(1&n&&(e.TgZ(0,"div",47),e._UZ(1,"fa-icon",48),e.YNc(2,da,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}const we=function(n,a){return{"mr-6":n,"mr-2":a}};function _a(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"form",9,10),e.NdJ("submit",function(){return e.CHM(t),e.oxw().onSendFunds()})("reset",function(){return e.CHM(t),e.oxw().resetData()}),e.TgZ(2,"mat-form-field",11),e.TgZ(3,"input",12,13),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transaction.address=o}),e.qZA(),e.YNc(5,ia,2,0,"mat-error",14),e.qZA(),e.TgZ(6,"mat-form-field",15),e.TgZ(7,"input",16,17),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transaction.satoshis=o}),e.qZA(),e.YNc(9,aa,2,0,"mat-hint",14),e.TgZ(10,"span",18),e._uU(11),e.qZA(),e.YNc(12,oa,2,1,"mat-error",14),e.qZA(),e.TgZ(13,"mat-form-field",19),e.TgZ(14,"mat-select",20),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().onAmountUnitChange(o)}),e.YNc(15,sa,2,2,"mat-option",21),e.qZA(),e.qZA(),e.TgZ(16,"div",22),e.TgZ(17,"div",23),e.TgZ(18,"div",24),e.TgZ(19,"mat-form-field",25),e.TgZ(20,"mat-select",26),e.NdJ("valueChange",function(o){return e.CHM(t),e.oxw().selFeeRate=o})("selectionChange",function(){return e.CHM(t),e.oxw().customFeeRate=null}),e.YNc(21,la,2,2,"mat-option",21),e.qZA(),e.qZA(),e.YNc(22,ca,4,5,"mat-form-field",27),e.qZA(),e.TgZ(23,"div",28),e.TgZ(24,"mat-checkbox",29),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().flgMinConf=o})("change",function(){e.CHM(t);const o=e.oxw();return o.flgMinConf?o.selFeeRate=null:o.minConfValue=null}),e.qZA(),e.TgZ(25,"mat-form-field",30),e.TgZ(26,"input",31,32),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().minConfValue=o}),e.qZA(),e.YNc(28,ua,2,0,"mat-error",14),e.qZA(),e.qZA(),e.qZA(),e.YNc(29,ma,16,9,"div",33),e._UZ(30,"div",22),e.YNc(31,fa,3,2,"div",34),e.TgZ(32,"div",35),e.TgZ(33,"button",36),e._uU(34,"Clear Fields"),e.qZA(),e.TgZ(35,"button",37),e._uU(36,"Send Funds"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.transaction.address),e.xp6(2),e.Q6J("ngIf",!t.transaction.address),e.xp6(2),e.Q6J("ngModel",t.transaction.satoshis)("type",t.flgUseAllBalance?"text":"number")("step",100)("min",0)("disabled",t.flgUseAllBalance),e.xp6(2),e.Q6J("ngIf",t.flgUseAllBalance),e.xp6(2),e.hij(" ",t.selAmountUnit," "),e.xp6(1),e.Q6J("ngIf",!t.transaction.satoshis),e.xp6(2),e.Q6J("value",t.selAmountUnit)("disabled",t.flgUseAllBalance),e.xp6(1),e.Q6J("ngForOf",t.amountUnits),e.xp6(4),e.Q6J("fxFlex","customperkb"!==t.selFeeRate||t.flgMinConf?"100":"48"),e.xp6(1),e.Q6J("value",t.selFeeRate)("disabled",t.flgMinConf),e.xp6(1),e.Q6J("ngForOf",t.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf),e.xp6(2),e.Q6J("ngModel",t.flgMinConf)("ngClass",e.WLB(28,we,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(2),e.Q6J("ngModel",t.minConfValue)("step",1)("min",0)("required",t.flgMinConf)("disabled",!t.flgMinConf),e.xp6(2),e.Q6J("ngIf",t.flgMinConf&&!t.minConfValue),e.xp6(1),e.Q6J("ngIf",t.isCompatibleVersion),e.xp6(2),e.Q6J("ngIf",""!==t.sendFundError)}}function ha(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw(3);e.Oqu(t.passwordFormLabel)}}function ga(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password is required."),e.qZA())}function Ca(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-step",53),e.TgZ(1,"form",71),e.YNc(2,ha,1,1,"ng-template",65),e.TgZ(3,"div",0),e.TgZ(4,"mat-form-field",1),e._UZ(5,"input",72),e.YNc(6,ga,2,0,"mat-error",14),e.qZA(),e.qZA(),e.TgZ(7,"div",73),e.TgZ(8,"button",74),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onAuthenticate()}),e._uU(9,"Confirm"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("stepControl",t.passwordFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.passwordFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function xa(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.sendFundFormLabel)}}function Ta(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function ya(n,a){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function Za(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function Aa(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",39),e._UZ(1,"input",75),e.YNc(2,Za,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("step",.1)("min",0),e.xp6(1),e.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.customFeeRate.value)}}function La(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function va(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.confirmFormLabel)}}function ba(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function Sa(n,a){if(1&n&&(e.TgZ(0,"div",47),e._UZ(1,"fa-icon",48),e.YNc(2,ba,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}function wa(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",49),e.TgZ(1,"mat-vertical-stepper",50,51),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().stepSelectionChanged(o)}),e.YNc(3,Ca,10,4,"mat-step",52),e.TgZ(4,"mat-step",53),e.TgZ(5,"form",54),e.YNc(6,xa,1,1,"ng-template",55),e.TgZ(7,"div",22),e.TgZ(8,"mat-form-field",1),e._UZ(9,"input",56),e.YNc(10,Ta,2,0,"mat-error",14),e.qZA(),e.TgZ(11,"div",57),e.TgZ(12,"div",24),e.TgZ(13,"mat-form-field",25),e.TgZ(14,"mat-select",58),e.YNc(15,ya,2,2,"mat-option",21),e.qZA(),e.qZA(),e.YNc(16,Aa,3,3,"mat-form-field",27),e.qZA(),e.TgZ(17,"div",28),e._UZ(18,"mat-checkbox",59),e.TgZ(19,"mat-form-field",30),e._UZ(20,"input",60),e.YNc(21,La,2,0,"mat-error",14),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"div",61),e.TgZ(23,"button",62),e._uU(24,"Next"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(25,"mat-step",63),e.TgZ(26,"form",64),e.YNc(27,va,1,1,"ng-template",65),e.TgZ(28,"div",49),e.TgZ(29,"div",66),e._UZ(30,"fa-icon",67),e.TgZ(31,"span"),e._uU(32,"You are about to sweep all funds from RTL. Are you sure?"),e.qZA(),e.qZA(),e.YNc(33,Sa,3,2,"div",34),e.TgZ(34,"div",61),e.TgZ(35,"button",68),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendFunds()}),e._uU(36,"Sweep All Funds"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(37,"div",69),e.TgZ(38,"button",70),e._uU(39),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("linear",!0),e.xp6(2),e.Q6J("ngIf",!t.appConfig.sso.rtlSSO),e.xp6(1),e.Q6J("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.sendFundFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),e.xp6(3),e.Q6J("fxFlex","customperkb"!==t.sendFundFormGroup.controls.selFeeRate.value||t.sendFundFormGroup.controls.flgMinConf.value?"100":"48"),e.xp6(2),e.Q6J("ngForOf",t.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value),e.xp6(2),e.Q6J("ngClass",e.WLB(20,we,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(2),e.Q6J("step",1)("min",0)("required",t.sendFundFormGroup.controls.flgMinConf.value),e.xp6(1),e.Q6J("ngIf",t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.minConfValue.value),e.xp6(4),e.Q6J("stepControl",t.confirmFormGroup),e.xp6(1),e.Q6J("formGroup",t.confirmFormGroup),e.xp6(4),e.Q6J("icon",t.faExclamationTriangle),e.xp6(3),e.Q6J("ngIf",""!==t.sendFundError),e.xp6(5),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(t.flgValidated?"Close":"Cancel")}}let qe=(()=>{class n{constructor(t,i,o,l,d,v,J,A,E,_d){this.dialogRef=t,this.data=i,this.logger=o,this.store=l,this.commonService=d,this.decimalPipe=v,this.actions=J,this.formBuilder=A,this.rtlEffects=E,this.snackBar=_d,this.faExclamationTriangle=x.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=null,this.selectedAddress=s._t[1],this.blockchainBalance={},this.information={},this.isCompatibleVersion=!1,this.newAddress="",this.transaction={},this.feeRateTypes=s.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.sendFundError="",this.fiatConversion=!1,this.amountUnits=s.uA,this.selAmountUnit=s.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=s.Xz,this.advancedTitle="Advanced Options",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.amountError="Amount is Required.",this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[c.kI.required]],password:["",[c.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",c.kI.required],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.flgMinConf.valueChanges.pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{t?(this.sendFundFormGroup.controls.selFeeRate.disable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.reset(),this.sendFundFormGroup.controls.minConfValue.enable(),this.sendFundFormGroup.controls.minConfValue.setValidators([c.kI.required]),this.sendFundFormGroup.controls.minConfValue.setValue(null)):(this.sendFundFormGroup.controls.selFeeRate.enable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.setValue(null),this.sendFundFormGroup.controls.minConfValue.disable(),this.sendFundFormGroup.controls.minConfValue.setValidators(null),this.sendFundFormGroup.controls.minConfValue.setErrors(null))}),this.sendFundFormGroup.controls.selFeeRate.valueChanges.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.sendFundFormGroup.controls.customFeeRate.setValue(null),this.sendFundFormGroup.controls.customFeeRate.reset(),this.sendFundFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.sendFundFormGroup.controls.flgMinConf.value?null:[c.kI.required])}),(0,$i.a)([this.store.select(Se.dT),this.store.select(Se.Yj)]).pipe((0,f.R)(this.unSubs[1])).subscribe(([t,i])=>{this.fiatConversion=t.settings.fiatConversion,this.amountUnits=t.settings.currencyUnits,this.appConfig=i}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.information=t,this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")}),this.store.select(h.T4).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(i=>"confirmed"===i.status),"value"),this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[4]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL||t.type===s.sW.SET_CHANNEL_TRANSACTION_RES_CL)).subscribe(t=>{t.type===s.sW.SET_CHANNEL_TRANSACTION_RES_CL&&(this.store.dispatch((0,L.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch((0,L.QO)({payload:ji(this.passwordFormGroup.controls.password.value).toString()})),this.rtlEffects.isAuthorizedRes.pipe((0,z.q)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.sendFundError="",this.flgUseAllBalance&&(this.transaction.satoshis="all"),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.transaction.utxos=[],this.selUTXOs.forEach(t=>this.transaction.utxos.push(t.txid+":"+t.output))),this.sweepAll){if(!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||this.sendFundFormGroup.controls.flgMinConf.value&&(!this.sendFundFormGroup.controls.minConfValue.value||this.sendFundFormGroup.controls.minConfValue.value<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis="all",this.transaction.address=this.sendFundFormGroup.controls.transactionAddress.value,this.sendFundFormGroup.controls.flgMinConf.value?(delete this.transaction.feeRate,this.transaction.minconf=this.sendFundFormGroup.controls.flgMinConf.value?this.sendFundFormGroup.controls.minConfValue.value:null):(delete this.transaction.minconf,this.transaction.feeRate="customperkb"===this.sendFundFormGroup.controls.selFeeRate.value&&!this.sendFundFormGroup.controls.flgMinConf.value&&this.sendFundFormGroup.controls.customFeeRate.value?1e3*this.sendFundFormGroup.controls.customFeeRate.value+"perkb":this.sendFundFormGroup.controls.selFeeRate.value),delete this.transaction.utxos,this.store.dispatch((0,T.Wi)({payload:this.transaction}))}else{if(this.transaction.minconf=this.flgMinConf?this.minConfValue:null,this.transaction.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,!this.transaction.address||""===this.transaction.address||!this.transaction.satoshis||+this.transaction.satoshis<=0||this.flgMinConf&&(!this.transaction.minconf||this.transaction.minconf<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis&&"all"!==this.transaction.satoshis&&this.selAmountUnit!==s.NT.SATS?this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?s.NT.OTHER:this.selAmountUnit,s.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,f.R)(this.unSubs[5])).subscribe({next:t=>{this.transaction.satoshis=t[s.NT.SATS],this.selAmountUnit=s.NT.SATS,this.store.dispatch((0,T.Wi)({payload:this.transaction}))},error:t=>{this.transaction.satoshis=null,this.selAmountUnit=s.NT.SATS,this.amountError="Conversion Error: "+t}}):this.store.dispatch((0,T.Wi)({payload:this.transaction}))}}resetData(){this.sendFundError="",this.transaction={},this.flgMinConf=!1,this.totalSelectedUTXOAmount=null,this.selUTXOs=[],this.flgUseAllBalance=!1,this.selAmountUnit=s.uA[0]}stepSelectionChanged(t){switch(this.sendFundError="",t.selectedIndex){default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+(this.sendFundFormGroup.controls.flgMinConf.value?" | Min Confirmation Blocks: "+this.sendFundFormGroup.controls.minConfValue.value:this.sendFundFormGroup.controls.selFeeRate.value?" | Fee Rate: "+this.feeRateTypes.find(i=>i.feeRateId===this.sendFundFormGroup.controls.selFeeRate.value).feeRateType:"")}t.selectedIndex0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((o,l)=>(i.value=o.value+l.value,i)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=null,this.transaction.satoshis=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.flgUseAllBalance?(this.transaction.satoshis=this.totalSelectedUTXOAmount,this.selAmountUnit=s.uA[0]):this.transaction.satoshis=null}onAmountUnitChange(t){const i=this,o=this.selAmountUnit===this.amountUnits[2]?s.NT.OTHER:this.selAmountUnit;let l=t.value===this.amountUnits[2]?s.NT.OTHER:t.value;this.transaction.satoshis&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(+this.transaction.satoshis,o,l,this.amountUnits[2],this.fiatConversion).pipe((0,f.R)(this.unSubs[6])).subscribe({next:d=>{this.selAmountUnit=t.value,i.transaction.satoshis=i.decimalPipe.transform(d[l],i.currencyUnitFormats[l]).replace(/,/g,"")},error:d=>{i.transaction.satoshis=null,this.amountError="Conversion Error: "+d,this.selAmountUnit=o,l=o}})}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.selUTXOs.length&&this.selUTXOs.length>0?"Advanced Options | Selected UTXOs: "+this.selUTXOs.length+" | Selected UTXO Amount: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats":"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v),e.Y36(u.JJ),e.Y36(H.eX),e.Y36(c.qu),e.Y36(W.V),e.Y36(j.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-send-modal"]],viewQuery:function(t,i){if(1&t&&(e.Gf(ea,7),e.Gf(ta,5),e.Gf(na,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.formSweepAll=o.first),e.iGM(o=e.CRH())&&(i.stepper=o.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amount","tabindex","2","required","",3,"ngModel","type","step","min","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxLayout","column","fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","35","fxLayoutAlign","start end"],["tabindex","8","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","60","tabindex","9","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","default","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","default",3,"click"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.YNc(9,_a,37,31,"form",7),e.qZA(),e.qZA(),e.qZA(),e.YNc(10,wa,40,23,"ng-template",null,8,e.W1O)),2&t){const o=e.MAs(11);e.xp6(5),e.Oqu(i.sweepAll?"Sweep All Funds":"Send Funds"),e.xp6(1),e.Q6J("mat-dialog-close",!1),e.xp6(3),e.Q6J("ngIf",!i.sweepAll)("ngIfElse",o)}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,u.O5,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.Q7,c.JJ,c.On,X.q,g.R9,R.gD,u.sg,le.oG,u.mk,q.oO,c.wV,c.qQ,g.TO,g.bx,B.ey,ee.ib,ee.yz,ee.yK,R.$L,oe.Rr,Q.gM,N.BN,K.Vq,K.C0,c.sg,K.VY,c.u,K.Ic],pipes:[u.JJ],styles:[""]}),n})();var de=_(2737);function qa(n,a){1&n&&e._UZ(0,"mat-progress-bar",27)}function Fa(n,a){1&n&&(e.TgZ(0,"th",28),e._uU(1," Transaction ID "),e.qZA())}function Oa(n,a){1&n&&(e.TgZ(0,"span",36),e.TgZ(1,"mat-icon",37),e._uU(2,"warning"),e.qZA(),e.qZA())}function Ra(n,a){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Oa,3,0,"span",35),e.qZA()),2&n){const t=e.oxw().$implicit;e.oxw();const i=e.MAs(32);e.xp6(1),e.Q6J("ngIf",t.value<1e3)("ngIfElse",i)}}function Ua(n,a){1&n&&e._UZ(0,"span",38)}function Na(n,a){if(1&n&&(e._UZ(0,"span",39),e.ALo(1,"titlecase")),2&n){const t=e.oxw().$implicit;e.s9C("matTooltip",e.lcZ(1,1,t.status))}}const ka=function(n){return{"max-width":n}};function Ia(n,a){if(1&n&&(e.TgZ(0,"td",29),e.TgZ(1,"span",30),e.YNc(2,Ra,2,2,"span",31),e.YNc(3,Ua,1,0,"span",32),e.YNc(4,Na,2,3,"span",33),e.TgZ(5,"span",34),e._uU(6),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(5,ka,i.screenSize===i.screenSizeEnum.XS?"10rem":"50rem")),e.xp6(1),e.Q6J("ngIf",i.numDustUTXOs>0&&!i.isDustUTXO),e.xp6(1),e.Q6J("ngIf","confirmed"===t.status),e.xp6(1),e.Q6J("ngIf","confirmed"!==t.status),e.xp6(2),e.Oqu(t.txid)}}function Ma(n,a){1&n&&(e.TgZ(0,"th",40),e._uU(1," Output "),e.qZA())}function Ea(n,a){if(1&n&&(e.TgZ(0,"td",29),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.output)," ")}}function Da(n,a){1&n&&(e.TgZ(0,"th",40),e._uU(1," Value (Sats) "),e.qZA())}function Pa(n,a){if(1&n&&(e.TgZ(0,"span",41),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.value))}}function Ja(n,a){if(1&n&&(e.TgZ(0,"span",44),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij("(",e.lcZ(2,1,-1*t.value),")")}}function Qa(n,a){if(1&n&&(e.TgZ(0,"td",29),e.YNc(1,Pa,3,3,"span",42),e.YNc(2,Ja,3,3,"span",43),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Q6J("ngIf",t.value>0||0===t.value),e.xp6(1),e.Q6J("ngIf",t.value<0)}}function Ya(n,a){1&n&&(e.TgZ(0,"th",40),e._uU(1," Blockheight "),e.qZA())}function Ba(n,a){if(1&n&&(e.TgZ(0,"td",29),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.blockheight)," ")}}function Ha(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",45),e.TgZ(1,"div",46),e.TgZ(2,"mat-select",47),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",48),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Va(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",49),e.TgZ(1,"button",50),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onUTXOClick(d,o)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function za(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No utxos available."),e.qZA())}function Ga(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting utxos..."),e.qZA())}function Xa(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Wa(n,a){if(1&n&&(e.TgZ(0,"td",51),e.YNc(1,za,2,0,"p",31),e.YNc(2,Ga,2,0,"p",31),e.YNc(3,Xa,2,1,"p",31),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Ka=function(n){return{"display-none":n}};function $a(n,a){if(1&n&&e._UZ(0,"tr",52),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Ka,(null==t.listUTXOs?null:t.listUTXOs.data)&&(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)>0))}}function ja(n,a){1&n&&e._UZ(0,"tr",53)}function eo(n,a){1&n&&e._UZ(0,"tr",54)}function to(n,a){1&n&&e._UZ(0,"mat-icon",37)}const no=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},io=function(){return["no_utxo"]};let ao=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.numDustUTXOs=0,this.isDustUTXO=!1,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["txid","value","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["txid","output","value","blockheight","actions"]):(this.flgSticky=!0,this.displayedColumns=["txid","output","value","blockheight","actions"])}ngOnInit(){this.store.select(h.T4).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.logger.info(t)})}ngAfterViewInit(){this.utxos&&this.utxos.length>0&&this.sort&&this.paginator&&this.loadUTXOsTable(this.utxos)}ngOnChanges(){this.utxos&&this.utxos.length>0&&this.loadUTXOsTable(this.utxos)}applyFilter(){this.listUTXOs.filter=this.selFilter.trim().toLowerCase()}onUTXOClick(t,i){const o=[[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"output",value:t.output,title:"Output",width:50,type:s.Gi.NUMBER},{key:"value",value:t.value,title:"Value (Sats)",width:50,type:s.Gi.NUMBER}],[{key:"status",value:this.commonService.titleCase(t.status),title:"Status",width:50,type:s.Gi.STRING},{key:"blockheight",value:t.blockheight,title:"Blockheight",width:50,type:s.Gi.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100}]];this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"UTXO Information",message:o}}}))}loadUTXOsTable(t){this.listUTXOs=new r.by([...t]),this.listUTXOs.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.listUTXOs.sort=this.sort,this.listUTXOs.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.listUTXOs.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listUTXOs)}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-utxos"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{numDustUTXOs:"numDustUTXOs",isDustUTXO:"isDustUTXO",utxos:"utxos"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("UTXOs")}]),e.TTD],decls:33,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"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","txid"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","blockheight"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_utxo"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[4,"ngIf"],["class","dot green","matTooltip","Confirmed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltipPosition","right",3,"matTooltip",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start center","color","warn",1,"mr-1"],["matTooltip","Confirmed","matTooltipPosition","right",1,"dot","green"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center",1,"red"],["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"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"input",4),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(5,"div",5),e.TgZ(6,"div",6),e.YNc(7,qa,1,0,"mat-progress-bar",7),e.TgZ(8,"table",8,9),e.ynx(10,10),e.YNc(11,Fa,2,0,"th",11),e.YNc(12,Ia,7,7,"td",12),e.BQk(),e.ynx(13,13),e.YNc(14,Ma,2,0,"th",14),e.YNc(15,Ea,4,3,"td",12),e.BQk(),e.ynx(16,15),e.YNc(17,Da,2,0,"th",14),e.YNc(18,Qa,3,2,"td",12),e.BQk(),e.ynx(19,16),e.YNc(20,Ya,2,0,"th",14),e.YNc(21,Ba,4,3,"td",12),e.BQk(),e.ynx(22,17),e.YNc(23,Ha,6,0,"th",18),e.YNc(24,Va,3,0,"td",19),e.BQk(),e.ynx(25,20),e.YNc(26,Wa,4,3,"td",21),e.BQk(),e.YNc(27,$a,1,3,"tr",22),e.YNc(28,ja,1,0,"tr",23),e.YNc(29,eo,1,0,"tr",24),e.qZA(),e._UZ(30,"mat-paginator",25),e.qZA(),e.qZA(),e.qZA(),e.YNc(31,to,1,0,"ng-template",null,26,e.W1O)),2&t&&(e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(3),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.listUTXOs)("ngClass",e.VKq(11,no,""!==i.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(13,io)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,pe.Hw,R.gD,R.$L,B.ey,U.lW,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.rS,u.JJ],styles:[".mat-column-txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var fe=_(4377);function oo(n,a){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numUtxos)}}function so(n,a){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"Dust UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numDustUtxos)}}let lo=(()=>{class n{constructor(t,i){this.logger=t,this.store=i,this.selectedTableIndex=0,this.selectedTableIndexChange=new e.vpe,this.utxos=[],this.numUtxos=0,this.dustUtxos=[],this.numDustUtxos=0,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.store.select(h.T4).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length,this.dustUtxos=t.utxos.filter(i=>+i.value<1e3),this.numDustUtxos=this.dustUtxos.length),t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length),this.logger.info(t)})}onSelectedIndexChanged(t){this.selectedTableIndexChange.emit(t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:8,vars:7,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["xLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["fxLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"mat-tab-group",1),e.NdJ("selectedIndexChange",function(l){return i.onSelectedIndexChanged(l)}),e.TgZ(2,"mat-tab"),e.YNc(3,oo,2,1,"ng-template",2),e._UZ(4,"rtl-cl-on-chain-utxos",3),e.qZA(),e.TgZ(5,"mat-tab"),e.YNc(6,so,2,1,"ng-template",2),e._UZ(7,"rtl-cl-on-chain-utxos",4),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("selectedIndex",i.selectedTableIndex),e.xp6(3),e.Q6J("utxos",i.utxos)("numDustUTXOs",i.numDustUtxos)("isDustUTXO",!1),e.xp6(3),e.Q6J("utxos",i.dustUtxos)("numDustUTXOs",i.numDustUtxos)("isDustUTXO",!0))},directives:[p.xw,p.yH,p.Wh,k.SP,k.uX,k.uD,ao,fe.k],styles:[""]}),n})();const ro=function(n,a){return[n,a]};function co(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",12),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=null==l?null:l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.Q6J("active",i.activeLink===(null==t?null:t.link))("routerLink",e.WLB(3,ro,null==t?null:t.link,null==i.selectedTable?null:i.selectedTable.name)),e.xp6(1),e.Oqu(null==t?null:t.name)}}let uo=(()=>{class n{constructor(t,i,o){this.store=t,this.router=i,this.activatedRoute=o,this.selNode={},this.faExchangeAlt=x.Ssp,this.faChartPie=x.OS1,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"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(i=>i.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link,this.selectedTable=this.tables.find(l=>l.name===i.urlAfterRedirects.substring(i.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[1])).subscribe(i=>{this.selNode=i}),this.store.select(h.Rn).pipe((0,f.R)(this.unSubs[2])).subscribe(i=>{this.balances=[{title:"Total Balance",dataValue:i.balance.totalBalance||0},{title:"Confirmed",dataValue:i.balance.confBalance},{title:"Unconfirmed",dataValue:i.balance.unconfBalance}]})}openSendFundsModal(t){this.store.dispatch((0,L.qR)({payload:{data:{sweepAll:t,component:qe}}}))}onSelectedTableIndexChanged(t){this.selectedTable=this.tables.find(i=>i.id===t),this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(C.F0),e.Y36(C.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain"]],decls:21,vars:5,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,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"On-chain Transactions"),e.qZA(),e.qZA(),e.TgZ(12,"div",6),e.TgZ(13,"mat-card"),e.TgZ(14,"mat-card-content",4),e.TgZ(15,"nav",7),e.YNc(16,co,2,6,"div",8),e.qZA(),e.TgZ(17,"div",9),e._UZ(18,"router-outlet"),e.qZA(),e.TgZ(19,"div",10),e.TgZ(20,"rtl-cl-utxo-tables",11),e.NdJ("selectedTableIndexChange",function(l){return i.onSelectedTableIndexChanged(l)}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartPie),e.xp6(6),e.Q6J("values",i.balances),e.xp6(2),e.Q6J("icon",i.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",i.links),e.xp6(4),e.Q6J("selectedTableIndex",null==i.selectedTable?null:i.selectedTable.id))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,de.D,k.BU,u.sg,p.yH,C.lC,lo,k.Nj,C.rH],styles:[""]}),n})();function po(n,a){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Channels"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activeChannels)}}function mo(n,a){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Peers"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activePeers)}}let fo=(()=>{class n{constructor(t,i,o){this.store=t,this.logger=i,this.router=o,this.activePeers=0,this.activeChannels=0,this.faUsers=x.FVb,this.faChartPie=x.OS1,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 m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(t=>t instanceof C.Av)).subscribe(t=>{this.activeLink=this.links.findIndex(i=>i.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.activeChannels=t.activeChannels.length||0}),this.store.select(h.Wi).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.logger.info(t)}),this.store.select(h.Rn).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.balances=[{title:"Total Balance",dataValue:t.balance.totalBalance||0},{title:"Confirmed",dataValue:t.balance.confBalance},{title:"Unconfirmed",dataValue:t.balance.unconfBalance}]})}onSelectedTabChange(t){this.router.navigateByUrl("/cl/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(F.mQ),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Connections"),e.qZA(),e.qZA(),e.TgZ(12,"div",6),e.TgZ(13,"mat-card"),e.TgZ(14,"mat-card-content",4),e.TgZ(15,"mat-tab-group",7),e.NdJ("selectedIndexChange",function(l){return i.activeLink=l})("selectedTabChange",function(l){return i.onSelectedTabChange(l)}),e.TgZ(16,"mat-tab"),e.YNc(17,po,2,1,"ng-template",8),e.qZA(),e.TgZ(18,"mat-tab"),e.YNc(19,mo,2,1,"ng-template",8),e.qZA(),e.qZA(),e.TgZ(20,"div",9),e._UZ(21,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartPie),e.xp6(6),e.Q6J("values",i.balances),e.xp6(2),e.Q6J("icon",i.faUsers),e.xp6(6),e.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,de.D,k.SP,k.uX,k.uD,p.yH,C.lC,fe.k],styles:[""]}),n})();function _o(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",11),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let ho=(()=>{class n{constructor(t,i,o){this.logger=t,this.store=i,this.router=o,this.faExchangeAlt=x.Ssp,this.faChartPie=x.OS1,this.currencyUnits=[],this.routerUrl="",this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.selNode={},this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link,this.routerUrl=i.urlAfterRedirects}),this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[1])).subscribe(i=>{if(this.selNode=i,this.selNode.enableOffers){this.store.dispatch((0,T.yl)()),this.store.dispatch((0,T.rs)()),this.links.push({link:"offers",name:"Offers"}),this.links.push({link:"paidoffr",name:"Paid Offers"});const o=this.links.find(l=>this.router.url.includes(l.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(h.Wj).pipe((0,f.R)(this.unSubs[2]),(0,ie.M)(this.store.select(h.Jo))).subscribe(([i,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===s.ol.OPERATOR?[{title:"Local Capacity",dataValue:i.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:i.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:i.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:i.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(i)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Lightning Balance"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA(),e.qZA(),e.qZA(),e.TgZ(8,"div",6),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Lightning Transactions"),e.qZA(),e.qZA(),e.TgZ(12,"div",7),e.TgZ(13,"mat-card"),e.TgZ(14,"mat-card-content",4),e.TgZ(15,"nav",8),e.YNc(16,_o,2,3,"div",9),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartPie),e.xp6(6),e.Q6J("values",i.balances),e.xp6(2),e.Q6J("icon",i.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,de.D,k.BU,u.sg,p.yH,C.lC,k.Nj,C.rH],styles:[""]}),n})();function go(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",11),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let Co=(()=>{class n{constructor(t){this.router=t,this.faMapSigns=x.SuH,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"routingpeers",name:"Routing Peers"},{link:"failedtransactions",name:"Failed Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-routing"]],decls:13,vars:2,consts:[["fxLayout","column",1,"mb-2"],["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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"fa-icon",2),e.TgZ(3,"span",3),e._uU(4,"Routing"),e.qZA(),e.qZA(),e.TgZ(5,"div",4),e.TgZ(6,"mat-card",5),e.TgZ(7,"mat-card-content",6),e.TgZ(8,"div",7),e.TgZ(9,"nav",8),e.YNc(10,go,2,3,"div",9),e.qZA(),e.qZA(),e.TgZ(11,"div",10),e._UZ(12,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(2),e.Q6J("icon",i.faMapSigns),e.xp6(8),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,p.yH,Z.a8,Z.dn,k.BU,u.sg,C.lC,k.Nj,C.rH],styles:[""]}),n})();var te=_(1979);function xo(n,a){if(1&n&&(e.TgZ(0,"span",6),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t)}}function To(n,a){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Type"),e.qZA())}function yo(n,a){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.type," ")}}function Zo(n,a){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Address"),e.qZA())}function Ao(n,a){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.address," ")}}function Lo(n,a){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Port"),e.qZA())}function vo(n,a){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.port," ")}}function bo(n,a){1&n&&(e.TgZ(0,"th",29),e.TgZ(1,"span",30),e._uU(2,"Actions"),e.qZA(),e.qZA())}function So(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",31),e.TgZ(1,"span",30),e.TgZ(2,"button",32),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyNodeURI(o)}),e._uU(3,"Copy Node URI"),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw(2);e.xp6(2),e.Q6J("payload",(null==i.lookupResult?null:i.lookupResult.nodeid)+"@"+t.address+":"+t.port)}}function wo(n,a){1&n&&e._UZ(0,"tr",33)}function qo(n,a){1&n&&e._UZ(0,"tr",34)}const Fo=function(n){return{"background-color":n}};function Oo(n,a){if(1&n&&(e.TgZ(0,"div",1),e._UZ(1,"mat-divider",2),e.TgZ(2,"div",3),e.TgZ(3,"div",4),e.TgZ(4,"h4",5),e._uU(5,"Alias"),e.qZA(),e.TgZ(6,"span",6),e._uU(7),e.TgZ(8,"span",7),e._uU(9),e.qZA(),e.qZA(),e.qZA(),e.TgZ(10,"div",8),e.TgZ(11,"h4",5),e._uU(12,"Pub Key"),e.qZA(),e.TgZ(13,"span",9),e._uU(14),e.qZA(),e.qZA(),e.qZA(),e._UZ(15,"mat-divider",10),e.TgZ(16,"div",3),e.TgZ(17,"div",4),e.TgZ(18,"h4",5),e._uU(19,"Last Update"),e.qZA(),e.TgZ(20,"span",6),e._uU(21),e.ALo(22,"date"),e.qZA(),e.qZA(),e.TgZ(23,"div",8),e.TgZ(24,"h4",5),e._uU(25,"Features"),e.qZA(),e.YNc(26,xo,2,1,"span",11),e.qZA(),e.qZA(),e._UZ(27,"mat-divider",10),e.TgZ(28,"div",12),e.TgZ(29,"h4",13),e._uU(30,"Addresses"),e.qZA(),e.TgZ(31,"div",14),e.TgZ(32,"table",15,16),e.ynx(34,17),e.YNc(35,To,2,0,"th",18),e.YNc(36,yo,2,1,"td",19),e.BQk(),e.ynx(37,20),e.YNc(38,Zo,2,0,"th",18),e.YNc(39,Ao,2,1,"td",19),e.BQk(),e.ynx(40,21),e.YNc(41,Lo,2,0,"th",18),e.YNc(42,vo,2,1,"td",19),e.BQk(),e.ynx(43,22),e.YNc(44,bo,3,0,"th",23),e.YNc(45,So,4,1,"td",24),e.BQk(),e.YNc(46,wo,1,0,"tr",25),e.YNc(47,qo,1,0,"tr",26),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==t.lookupResult?null:t.lookupResult.alias),e.xp6(1),e.Q6J("ngStyle",e.VKq(15,Fo,"#"+(null==t.lookupResult?null:t.lookupResult.color))),e.xp6(1),e.Oqu(null!=t.lookupResult&&t.lookupResult.color?"#"+(null==t.lookupResult?null:t.lookupResult.color):""),e.xp6(5),e.Oqu(null==t.lookupResult?null:t.lookupResult.nodeid),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(22,12,1e3*(null==t.lookupResult?null:t.lookupResult.last_timestamp),"dd/MMM/YYYY HH:mm")),e.xp6(5),e.Q6J("ngForOf",t.featureDescriptions),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Q6J("dataSource",t.addresses),e.xp6(14),e.Q6J("matHeaderRowDef",t.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}let Ro=(()=>{class n{constructor(t,i){this.logger=t,this.snackBar=i,this.featureDescriptions=[],this.displayedColumns=["type","address","port","actions"]}ngOnInit(){if(this.addresses=new r.by(this.lookupResult&&this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(t,i)=>t[i]&&isNaN(t[i])?t[i].toLocaleLowerCase():t[i]?+t[i]:null,this.lookupResult.features&&""!==this.lookupResult.features.trim()){const t=parseInt(this.lookupResult.features,16);s._C.forEach(i=>{t&(1<{class n{constructor(t){this.store=t,this.lookupResult=[],this.node1_match=!1,this.node2_match=!1,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.store.select(h.W3).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.lookupResult.length>0&&this.lookupResult[0].source===t.id&&(this.node1_match=!0),this.lookupResult.length>1&&this.lookupResult[1].source===t.id&&(this.node2_match=!0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],[3,"inset"],["fxLayout","column","fxFlex","20",1,"my-1"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","10",1,"my-1"],[1,"page-title","font-bold-500"]],template:function(t,i){1&t&&e.YNc(0,Mo,204,91,"div",0),2&t&&e.Q6J("ngIf",i.lookupResult)},directives:[u.O5,p.xw,G.d,p.Wh,p.yH],pipes:[u.JJ,u.uU],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),n})();const Do=["form"];function Po(n,a){if(1&n&&(e.TgZ(0,"mat-radio-button",17),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("value",t.id)("checked",i.selectedFieldId===t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Jo(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function Qo(n,a){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"rtl-cl-node-lookup",26),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("lookupResult",t.nodeLookupValue)}}function Yo(n,a){if(1&n&&(e.TgZ(0,"span",24),e.YNc(1,Qo,2,1,"div",25),e.qZA()),2&n){const t=e.oxw(2),i=e.MAs(19);e.xp6(1),e.Q6J("ngIf",""!==t.nodeLookupValue.nodeid)("ngIfElse",i)}}function Bo(n,a){if(1&n&&(e.TgZ(0,"div"),e._UZ(1,"rtl-cl-channel-lookup",26),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("lookupResult",t.channelLookupValue)}}function Ho(n,a){if(1&n&&(e.TgZ(0,"span",24),e.YNc(1,Bo,2,1,"div",25),e.qZA()),2&n){const t=e.oxw(2),i=e.MAs(19);e.xp6(1),e.Q6J("ngIf",t.channelLookupValue.length>0)("ngIfElse",i)}}function Vo(n,a){1&n&&(e.TgZ(0,"span",24),e.TgZ(1,"h3"),e._uU(2,"Error! Unable to find details!"),e.qZA(),e.qZA())}function zo(n,a){if(1&n&&(e.TgZ(0,"div",18),e.TgZ(1,"div",19),e.TgZ(2,"span",20),e._uU(3),e.qZA(),e.qZA(),e.TgZ(4,"div",21),e.YNc(5,Yo,2,2,"span",22),e.YNc(6,Ho,2,2,"span",22),e.YNc(7,Vo,3,0,"span",23),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(3),e.hij("",t.lookupFields[t.selectedFieldId].name," Details"),e.xp6(1),e.Q6J("ngSwitch",t.selectedFieldId),e.xp6(1),e.Q6J("ngSwitchCase",0),e.xp6(1),e.Q6J("ngSwitchCase",1)}}function Go(n,a){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find details!"),e.qZA())}const Xo=function(n){return{"mt-1":!0,"mt-2":n}};let Wo=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.commonService=i,this.store=o,this.actions=l,this.lookupKey="",this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=x.wn1,this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(t=>t.type===s.sW.SET_LOOKUP_CL||t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{if(t.type===s.sW.SET_LOOKUP_CL){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue="object"!=typeof t.payload[0]?{nodeid:""}:JSON.parse(JSON.stringify(t.payload[0]));break;case 1:this.channelLookupValue="object"!=typeof t.payload[0]?[]:JSON.parse(JSON.stringify(t.payload))}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.selectedFieldId){case 0:this.store.dispatch((0,T.Sf)({payload:this.lookupKey.trim()}));break;case 1:this.store.dispatch((0,T.$A)({payload:{uiMessage:s.m6.SEARCHING_CHANNEL,shortChannelID:this.lookupKey.trim(),showError:!1}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-lookups"]],viewQuery:function(t,i){if(1&t&&e.Gf(Do,7),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first)}},decls:20,vars:9,consts:[["fxLayout","column"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[4,"ngIf"],["fxLayout","row","fxFlex","100",1,"mt-1"],["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",""],[1,"mr-4",3,"value","checked"],["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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-content",2),e.TgZ(3,"form",3,4),e.TgZ(5,"div",5),e.TgZ(6,"mat-radio-group",6),e.NdJ("ngModelChange",function(l){return i.selectedFieldId=l})("change",function(l){return i.onSelectChange(l)}),e.YNc(7,Po,2,3,"mat-radio-button",7),e.qZA(),e.qZA(),e.TgZ(8,"mat-form-field",8),e.TgZ(9,"input",9,10),e.NdJ("change",function(){return i.clearLookupValue()})("ngModelChange",function(l){return i.lookupKey=l}),e.qZA(),e.YNc(11,Jo,2,1,"mat-error",11),e.qZA(),e.TgZ(12,"div",12),e.TgZ(13,"button",13),e.NdJ("click",function(){return i.resetData()}),e._uU(14,"Clear"),e.qZA(),e.TgZ(15,"button",14),e.NdJ("click",function(){return i.onLookup()}),e._uU(16,"Lookup"),e.qZA(),e.qZA(),e.qZA(),e.YNc(17,zo,8,4,"div",15),e.qZA(),e.qZA(),e.qZA(),e.YNc(18,Go,2,0,"ng-template",null,16,e.W1O)),2&t&&(e.xp6(6),e.Q6J("ngModel",i.selectedFieldId),e.xp6(1),e.Q6J("ngForOf",i.lookupFields),e.xp6(1),e.Q6J("ngClass",e.VKq(7,Xo,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM)),e.xp6(1),e.Q6J("placeholder",(null==i.lookupFields[i.selectedFieldId]?null:i.lookupFields[i.selectedFieldId].placeholder)||"Lookup Key")("ngModel",i.lookupKey),e.xp6(2),e.Q6J("ngIf",!i.lookupKey),e.xp6(6),e.Q6J("ngIf",i.flgSetLookupValue))},directives:[p.xw,p.yH,p.Wh,Z.dn,c._Y,c.JL,c.F,se.VQ,c.JJ,c.On,u.sg,g.KE,u.mk,q.oO,I.Nt,c.Fj,c.Q7,u.O5,U.lW,se.U0,g.TO,u.RF,u.n9,u.ED,Ro,Eo],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var ne=(()=>{return(n=ne||(ne={})).KB="KB",n.KW="KW",ne;var n})();function Ko(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div",4),e.TgZ(3,"h4",5),e._uU(4,"Opening"),e.qZA(),e.TgZ(5,"div",6),e._uU(6),e.ALo(7,"number"),e.qZA(),e.qZA(),e.TgZ(8,"div",7),e.TgZ(9,"h4",5),e._uU(10,"Mutual Close"),e.qZA(),e.TgZ(11,"div",6),e._uU(12),e.ALo(13,"number"),e.qZA(),e.qZA(),e.TgZ(14,"div",8),e.TgZ(15,"h4",5),e._uU(16,"Unilateral Close"),e.qZA(),e.TgZ(17,"div",6),e._uU(18),e.ALo(19,"number"),e.qZA(),e.qZA(),e.TgZ(20,"div",9),e.TgZ(21,"h4",5),e._uU(22,"Delayed To Us"),e.qZA(),e.TgZ(23,"div",6),e._uU(24),e.ALo(25,"number"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(26,"div",3),e.TgZ(27,"div",10),e.TgZ(28,"h4",5),e._uU(29,"Minimum Acceptable"),e.qZA(),e.TgZ(30,"div",6),e._uU(31),e.ALo(32,"number"),e.qZA(),e.qZA(),e.TgZ(33,"div",11),e.TgZ(34,"h4",5),e._uU(35,"Maximum Acceptable"),e.qZA(),e.TgZ(36,"div",6),e._uU(37),e.ALo(38,"number"),e.qZA(),e.qZA(),e.TgZ(39,"div",12),e.TgZ(40,"h4",5),e._uU(41,"HTLC Resolution"),e.qZA(),e.TgZ(42,"div",6),e._uU(43),e.ALo(44,"number"),e.qZA(),e.qZA(),e.TgZ(45,"div",13),e.TgZ(46,"h4",5),e._uU(47,"Penalty"),e.qZA(),e.TgZ(48,"div",6),e._uU(49),e.ALo(50,"number"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(e.lcZ(7,8,null==t.perkbw?null:t.perkbw.opening)),e.xp6(6),e.Oqu(e.lcZ(13,10,null==t.perkbw?null:t.perkbw.mutual_close)),e.xp6(6),e.Oqu(e.lcZ(19,12,null==t.perkbw?null:t.perkbw.unilateral_close)),e.xp6(6),e.Oqu(e.lcZ(25,14,null==t.perkbw?null:t.perkbw.delayed_to_us)),e.xp6(7),e.Oqu(e.lcZ(32,16,null==t.perkbw?null:t.perkbw.min_acceptable)),e.xp6(6),e.Oqu(e.lcZ(38,18,null==t.perkbw?null:t.perkbw.max_acceptable)),e.xp6(6),e.Oqu(e.lcZ(44,20,null==t.perkbw?null:t.perkbw.htlc_resolution)),e.xp6(6),e.Oqu(e.lcZ(50,22,null==t.perkbw?null:t.perkbw.penalty))}}function $o(n,a){if(1&n&&(e.TgZ(0,"div",14),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let jo=(()=>{class n{constructor(){this.perkbw={}}ngAfterContentChecked(){this.feeRateStyle===ne.KB?this.perkbw=this.feeRates.perkb:this.feeRateStyle===ne.KW&&(this.perkbw=this.feeRates.perkw)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-fee-rates"]],inputs:{feeRateStyle:"feeRateStyle",feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["matTooltip","Default feerate for fundchannel and withdraw","matTooltipPosition","below"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Feerate to aim for in cooperative shutdown. Note that since mutual close is a negotiation, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer","matTooltipPosition","below"],["matTooltip","Feerate for commitment_transaction in a live channel which we originally funded","matTooltipPosition","below"],["matTooltip","Feerate for returning unilateral close funds to our wallet","matTooltipPosition","below"],["matTooltip","The smallest feerate that you can use, usually the minimum relayed feerate of the backend","matTooltipPosition","below"],["matTooltip","The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)","matTooltipPosition","below"],["matTooltip","Feerate for returning unilateral close HTLC outputs to our wallet","matTooltipPosition","below"],["matTooltip","Feerate to start at when penalizing a cheat attempt","matTooltipPosition","below"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,Ko,51,24,"div",0),e.YNc(1,$o,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,Q.gM],pipes:[u.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),n})();function es(n,a){if(1&n&&(e.TgZ(0,"div",2),e.TgZ(1,"div",3),e.TgZ(2,"div",4),e.TgZ(3,"h4",5),e._uU(4,"Opening Channel"),e.qZA(),e.TgZ(5,"div",6),e._uU(6),e.ALo(7,"number"),e.qZA(),e.qZA(),e.TgZ(8,"div",7),e.TgZ(9,"h4",5),e._uU(10,"Mutual Close"),e.qZA(),e.TgZ(11,"div",6),e._uU(12),e.ALo(13,"number"),e.qZA(),e.qZA(),e.TgZ(14,"div",8),e.TgZ(15,"h4",5),e._uU(16,"Unilateral Close"),e.qZA(),e.TgZ(17,"div",6),e._uU(18),e.ALo(19,"number"),e.qZA(),e.qZA(),e.TgZ(20,"div",9),e._UZ(21,"h4",5),e._UZ(22,"div",6),e.qZA(),e.qZA(),e.TgZ(23,"div",3),e.TgZ(24,"div",10),e.TgZ(25,"h4",5),e._uU(26,"HTLC Timeout"),e.qZA(),e.TgZ(27,"div",6),e._uU(28),e.ALo(29,"number"),e.qZA(),e.qZA(),e.TgZ(30,"div",11),e.TgZ(31,"h4",5),e._uU(32,"HTLC Success"),e.qZA(),e.TgZ(33,"div",6),e._uU(34),e.ALo(35,"number"),e.qZA(),e.qZA(),e.TgZ(36,"div",9),e._UZ(37,"h4",5),e._UZ(38,"div",6),e.qZA(),e.TgZ(39,"div",9),e._UZ(40,"h4",5),e._UZ(41,"div",6),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(e.lcZ(7,5,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.opening_channel_satoshis)),e.xp6(6),e.Oqu(e.lcZ(13,7,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.mutual_close_satoshis)),e.xp6(6),e.Oqu(e.lcZ(19,9,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.unilateral_close_satoshis)),e.xp6(10),e.Oqu(e.lcZ(29,11,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_timeout_satoshis)),e.xp6(6),e.Oqu(e.lcZ(35,13,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_success_satoshis))}}function ts(n,a){if(1&n&&(e.TgZ(0,"div",12),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let ns=(()=>{class n{constructor(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-onchain-fee-estimates"]],inputs:{feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["matTooltip","Estimated cost of typical channel open","matTooltipPosition","below"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Estimated cost of typical channel close","matTooltipPosition","below"],["matTooltip","Estimated cost of typical unilateral close (without HTLCs)","matTooltipPosition","below"],["fxFlex","12"],["matTooltip","Estimated cost of typical HTLC timeout transaction","matTooltipPosition","below"],["matTooltip","Estimated cost of typical HTLC fulfillment transaction","matTooltipPosition","below"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,i){if(1&t&&(e.YNc(0,es,42,15,"div",0),e.YNc(1,ts,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,Q.gM],pipes:[u.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),n})();function is(n,a){1&n&&e._UZ(0,"mat-progress-bar",19)}function as(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",20),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function os(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-status-info",21),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function ss(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-info",22),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function ls(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function rs(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[6])}}function cs(n,a){if(1&n&&e._UZ(0,"rtl-cl-onchain-fee-estimates",24),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}const Fe=function(n){return{"dashboard-card-content":!0,"error-border":n}};function us(n,a){if(1&n&&(e.TgZ(0,"mat-grid-tile",4),e.TgZ(1,"div",5),e.TgZ(2,"div",6),e.TgZ(3,"div",7),e._UZ(4,"fa-icon",8),e.TgZ(5,"span"),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",9),e.TgZ(8,"mat-card",10),e.TgZ(9,"mat-card-content",11),e.YNc(10,is,1,0,"mat-progress-bar",12),e.TgZ(11,"div",13),e.YNc(12,as,1,2,"rtl-cl-node-info",14),e.YNc(13,os,1,2,"rtl-cl-channel-status-info",15),e.YNc(14,ss,1,2,"rtl-cl-fee-info",16),e.YNc(15,ls,1,3,"rtl-cl-fee-rates",17),e.YNc(16,rs,1,3,"rtl-cl-fee-rates",17),e.YNc(17,cs,1,2,"rtl-cl-onchain-fee-estimates",18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(4),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(3),e.Q6J("ngClass",e.VKq(13,Fe,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","status"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKB"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKW"),e.xp6(1),e.Q6J("ngSwitchCase","onChainFeeEstimates")}}function ps(n,a){if(1&n&&(e.TgZ(0,"mat-grid-list",2),e.YNc(1,us,18,15,"mat-grid-tile",3),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.nodeCardsOperator)}}function ms(n,a){1&n&&e._UZ(0,"mat-progress-bar",19)}function ds(n,a){if(1&n&&e._UZ(0,"rtl-cl-node-info",20),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function fs(n,a){if(1&n&&e._UZ(0,"rtl-cl-channel-status-info",21),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function _s(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-info",22),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function hs(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function gs(n,a){if(1&n&&e._UZ(0,"rtl-cl-fee-rates",23),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[5])}}function Cs(n,a){if(1&n&&e._UZ(0,"rtl-cl-onchain-fee-estimates",24),2&n){const t=e.oxw(3);e.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}function xs(n,a){if(1&n&&(e.TgZ(0,"mat-grid-tile",4),e.TgZ(1,"div",5),e.TgZ(2,"div",6),e.TgZ(3,"div",25),e._UZ(4,"fa-icon",8),e.TgZ(5,"span"),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",9),e.TgZ(8,"mat-card",10),e.TgZ(9,"mat-card-content",11),e.YNc(10,ms,1,0,"mat-progress-bar",12),e.TgZ(11,"div",13),e.YNc(12,ds,1,2,"rtl-cl-node-info",14),e.YNc(13,fs,1,2,"rtl-cl-channel-status-info",15),e.YNc(14,_s,1,2,"rtl-cl-fee-info",16),e.YNc(15,hs,1,3,"rtl-cl-fee-rates",17),e.YNc(16,gs,1,3,"rtl-cl-fee-rates",17),e.YNc(17,Cs,1,2,"rtl-cl-onchain-fee-estimates",18),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(4),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(3),e.Q6J("ngClass",e.VKq(13,Fe,"node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.ERROR)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"status"===t.id&&(i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusLRBal.status===i.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusFHistory.status===i.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&i.apiCallStatusPerKB.status===i.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&i.apiCallStatusPerKW.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","status"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKB"),e.xp6(1),e.Q6J("ngSwitchCase","feeRatesKW"),e.xp6(1),e.Q6J("ngSwitchCase","onChainFeeEstimates")}}function Ts(n,a){if(1&n&&(e.TgZ(0,"mat-grid-list",2),e.YNc(1,xs,18,15,"mat-grid-tile",3),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.nodeCardsMerchant)}}let ys=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.faBolt=x.BDt,this.faServer=x.xf3,this.faNetworkWired=x.kXW,this.faLink=x.nNP,this.selNode={},this.information={},this.channelsStatus={active:{},pending:{},inactive:{}},this.feeRatesPerKB={},this.feeRatesPerKW={},this.nodeCardsOperator=[],this.nodeCardsMerchant=[],this.screenSize="",this.screenSizeEnum=s.cu,this.userPersonaEnum=s.ol,this.errorMessages=["","","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFees=null,this.apiCallStatusFHistory=null,this.apiCallStatusPerKB=null,this.apiCallStatusPerKW=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:6,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:6,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:6,rows:1},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}]):(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:2,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:2,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:2,rows:3},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}])}ngOnInit(){this.store.select(h.Hz).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusNodeInfo.status===s.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1]),(0,ie.M)(this.store.select(h.Wj))).subscribe(([t,i])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusLRBal=t.apiCallStatus,this.apiCallStatusChannels=i.apiCallStatus,this.apiCallStatusLRBal.status===s.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message),this.apiCallStatusChannels.status===s.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.channelsStatus.active.capacity=i.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=i.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=i.localRemoteBalance.inactiveBalance||0}),this.store.select(h.JG).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===s.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusFHistory=t.apiCallStatus,this.apiCallStatusFHistory.status===s.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message),t.forwardingHistory&&t.forwardingHistory.length&&(this.fees.totalTxCount=t.forwardingHistory.length)}),this.store.select(h.zm).pipe((0,f.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[5]="",this.apiCallStatusPerKB=t.apiCallStatus,this.apiCallStatusPerKB.status===s.Bn.ERROR&&(this.errorMessages[5]="object"==typeof this.apiCallStatusPerKB.message?JSON.stringify(this.apiCallStatusPerKB.message):this.apiCallStatusPerKB.message),this.feeRatesPerKB=t.feeRatesPerKB}),this.store.select(h.hx).pipe((0,f.R)(this.unSubs[5])).subscribe(t=>{this.errorMessages[6]="",this.apiCallStatusPerKW=t.apiCallStatus,this.apiCallStatusPerKW.status===s.Bn.ERROR&&(this.errorMessages[6]="object"==typeof this.apiCallStatusPerKW.message?JSON.stringify(this.apiCallStatusPerKW.message):this.apiCallStatusPerKW.message),this.feeRatesPerKW=t.feeRatesPerKW})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-network-info"]],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","6","rowHeight","100px",4,"ngIf"],["cols","6","rowHeight","100px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-2"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxLayout","column","fxFlex","100",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","feeRateStyle","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","errorMessage",4,"ngSwitchCase"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],[1,"h-100",3,"feeRates","feeRateStyle","errorMessage"],[1,"h-100",3,"feeRates","errorMessage"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-15px"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,ps,2,1,"mat-grid-list",1),e.YNc(2,Ts,2,1,"mat-grid-list",1),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.OPERATOR),e.xp6(1),e.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.MERCHANT))},directives:[p.xw,p.Wh,u.O5,ae.Il,u.sg,ae.DX,p.yH,N.BN,Z.a8,Z.dn,u.mk,q.oO,u.RF,u.n9,P.pW,Te,Ze,ye,jo,ns],styles:[""]}),n})();function Zs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let As=(()=>{class n{constructor(t){this.router=t,this.faUserCheck=x.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-sign-verify-message"]],decls:11,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"],["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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Sign/Verify Message"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e.TgZ(7,"nav",5),e.YNc(8,Zs,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faUserCheck),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,k.BU,u.sg,p.yH,C.lC,k.Nj,C.rH],styles:[""]}),n})();var Ls=_(4240);function vs(n,a){if(1&n&&(e.TgZ(0,"mat-option",7),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.addressTp," ")}}let bs=(()=>{class n{constructor(t,i){this.store=t,this.clEffects=i,this.addressTypes=s._t,this.selectedAddressType=s._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,T._E)({payload:this.selectedAddressType})),this.clEffects.setNewAddressCL.pipe((0,z.q)(1)).subscribe(t=>{this.newAddress=t,setTimeout(()=>{this.store.dispatch((0,L.qR)({payload:{data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:Ls.n}}}))},0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(re.s))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","space-between end","fxLayoutAlign.gt-sm","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-form-field",2),e.TgZ(3,"mat-select",3),e.NdJ("ngModelChange",function(l){return i.selectedAddressType=l}),e.YNc(4,vs,2,2,"mat-option",4),e.qZA(),e.qZA(),e.TgZ(5,"div",5),e.TgZ(6,"button",6),e.NdJ("click",function(){return i.onGenerateAddress()}),e._uU(7,"Generate Address"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Q6J("ngModel",i.selectedAddressType),e.xp6(1),e.Q6J("ngForOf",i.addressTypes))},directives:[p.xw,p.Wh,g.KE,p.yH,R.gD,c.JJ,c.On,u.sg,U.lW,B.ey],styles:[""]}),n})(),Oe=(()=>{class n{constructor(t,i){this.store=t,this.activatedRoute=i,this.sweepAll=!1,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.activatedRoute.data.pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.sweepAll=t.sweepAll})}openSendFundsModal(){this.store.dispatch((0,L.qR)({payload:{data:{sweepAll:this.sweepAll,component:qe}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(C.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return i.openSendFundsModal()}),e._uU(3),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Oqu(i.sweepAll?"Sweep All":"Send Funds"))},directives:[p.xw,p.yH,p.Wh,U.lW],styles:[""]}),n})();var Ss=_(579),Re=_(2201),ws=_(4085),Ue=_(9851);const qs=["form"];function Fs(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t.alias?t.alias:t.id?t.id:"")}}function Os(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer alias is required."),e.qZA())}function Rs(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer not found in the list."),e.qZA())}function Us(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1),e.TgZ(1,"input",39),e.NdJ("change",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.qZA(),e.TgZ(2,"mat-autocomplete",40,41),e.NdJ("optionSelected",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.YNc(4,Fs,2,2,"mat-option",26),e.ALo(5,"async"),e.qZA(),e.YNc(6,Os,2,0,"mat-error",17),e.YNc(7,Rs,2,0,"mat-error",17),e.qZA()}if(2&n){const t=e.MAs(3),i=e.oxw();e.xp6(1),e.Q6J("formControl",i.selectedPeer)("matAutocomplete",t),e.xp6(1),e.Q6J("displayWith",i.displayFn),e.xp6(2),e.Q6J("ngForOf",e.lcZ(5,6,i.filteredPeers)),e.xp6(2),e.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.required),e.xp6(1),e.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.notfound)}}function Ns(n,a){1&n&&e.GkF(0)}function ks(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Is(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function Ms(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function Es(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function Ds(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",43),e.TgZ(1,"input",44,45),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().customFeeRate=o}),e.qZA(),e.YNc(3,Es,2,0,"mat-error",17),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),e.xp6(2),e.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function Ps(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function Js(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t),e.xp6(1),e.hij("",e.lcZ(2,2,t.value)," Sats")}}function Qs(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",22),e.TgZ(1,"mat-form-field",46),e.TgZ(2,"mat-select",47),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().onUTXOSelectionChange(o)})("valueChange",function(o){return e.CHM(t),e.oxw().selUTXOs=o}),e.TgZ(3,"mat-select-trigger"),e._uU(4),e.ALo(5,"number"),e.qZA(),e.YNc(6,Js,3,4,"mat-option",26),e.qZA(),e.qZA(),e.TgZ(7,"mat-slide-toggle",48),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().flgUseAllBalance=o})("change",function(){return e.CHM(t),e.oxw().onUTXOAllBalanceChange()}),e._uU(8," Use selected UTXOs balance "),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("value",t.selUTXOs),e.xp6(2),e.AsE("",e.lcZ(5,6,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),e.xp6(2),e.Q6J("ngForOf",t.utxos),e.xp6(1),e.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function Ys(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.channelConnectionError)}}function Bs(n,a){if(1&n&&(e.TgZ(0,"div",49),e._UZ(1,"fa-icon",50),e.YNc(2,Ys,2,1,"span",17),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.channelConnectionError)}}function Hs(n,a){if(1&n&&(e.TgZ(0,"mat-expansion-panel",52),e.TgZ(1,"mat-expansion-panel-header"),e.TgZ(2,"mat-panel-title"),e.TgZ(3,"span"),e._uU(4,"Peer: \xa0"),e.qZA(),e.TgZ(5,"strong",53),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",9),e.TgZ(8,"div",0),e.TgZ(9,"div",1),e.TgZ(10,"h4",54),e._uU(11,"Pubkey"),e.qZA(),e.TgZ(12,"span",55),e._uU(13),e.qZA(),e.qZA(),e.qZA(),e._UZ(14,"mat-divider",56),e.TgZ(15,"div",0),e.TgZ(16,"div",57),e.TgZ(17,"h4",54),e._uU(18,"Address"),e.qZA(),e.TgZ(19,"span",58),e._uU(20),e.qZA(),e.qZA(),e.TgZ(21,"div",57),e.TgZ(22,"h4",54),e._uU(23,"Connected"),e.qZA(),e.TgZ(24,"span",58),e._uU(25),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&n){const t=e.oxw(2);e.xp6(6),e.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.id)),e.xp6(7),e.Oqu(t.peer.id),e.xp6(7),e.Oqu(null==t.peer?null:t.peer.netaddr),e.xp6(5),e.Oqu(t.peer.connected?"True":"False")}}function Vs(n,a){if(1&n&&e.YNc(0,Hs,26,4,"mat-expansion-panel",51),2&n){const t=e.oxw();e.Q6J("ngIf",t.peer)}}const zs=function(n,a){return{"mr-6":n,"mr-2":a}};let Ne=(()=>{class n{constructor(t,i,o,l,d,v){this.dialogRef=t,this.data=i,this.store=o,this.actions=l,this.decimalPipe=d,this.commonService=v,this.selectedPeer=new c.NI,this.faExclamationTriangle=x.eHv,this.isCompatibleVersion=!1,this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=0,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.fundingAmount=null,this.selectedPubkey="",this.isPrivate=!1,this.feeRateTypes=s.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.isCompatibleVersion=this.data.message.isCompatibleVersion,this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.utxos=this.data.message.utxos,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(o=>o.type===s.sW.UPDATE_API_CALL_STATUS_CL||o.type===s.sW.FETCH_CHANNELS_CL)).subscribe(o=>{o.type===s.sW.UPDATE_API_CALL_STATUS_CL&&o.payload.status===s.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===s.sW.FETCH_CHANNELS_CL&&this.dialogRef.close()});let t="",i="";this.sortedPeers=this.peers.sort((o,l)=>(t=o.alias?o.alias.toLowerCase():o.id?o.id.toLowerCase():"",i=l.alias?l.alias.toLowerCase():o.id.toLowerCase(),ti?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,f.R)(this.unSubs[1]),(0,Ss.O)(""),(0,Re.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.id),(0,Re.U)(o=>o?this.filterPeers(o):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(i=>0===i.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.id?t.id:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.id?this.selectedPeer.value.id:null,"string"==typeof this.selectedPeer.value){const t=this.peers.filter(i=>i.alias.length===this.selectedPeer.value.length&&0===i.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].id&&(this.selectedPubkey=t[0].id)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.flgMinConf=!1,this.selFeeRate="",this.minConfValue=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){t&&(this.flgMinConf||this.selFeeRate||this.selUTXOs.length&&0!==this.selUTXOs.length)?(this.advancedTitle="Advanced Options",this.flgMinConf&&(this.advancedTitle=this.advancedTitle+" | Min Confirmation Blocks: "+this.minConfValue),this.selFeeRate&&(this.advancedTitle=this.advancedTitle+" | Fee Rate: "+(this.customFeeRate?this.customFeeRate+" (Sats/vB)":this.feeRateTypes.find(i=>i.feeRateId===this.selFeeRate).feeRateType)),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.advancedTitle=this.advancedTitle+" | Total Selected: "+this.selUTXOs.length+" | Selected UTXOs: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats")):this.advancedTitle="Advanced Options"}onUTXOSelectionChange(t){const i={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((o,l)=>(i.value=o.value+l.value,i)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=0,this.fundingAmount=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.fundingAmount=this.flgUseAllBalance?this.totalSelectedUTXOAmount:null}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.flgMinConf&&!this.minConfValue||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;const t={peerId:this.peer&&this.peer.id?this.peer.id:this.selectedPubkey,satoshis:this.flgUseAllBalance?"all":this.fundingAmount.toString(),announce:!this.isPrivate,minconf:this.flgMinConf?this.minConfValue:null};t.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,this.selUTXOs.length&&this.selUTXOs.length>0&&(t.utxos=[],this.selUTXOs.forEach(i=>t.utxos.push(i.txid+":"+i.output))),this.store.dispatch((0,T.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(H.eX),e.Y36(u.JJ),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-open-channel"]],viewQuery:function(t,i){if(1&t&&e.Gf(qs,7),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first)}},decls:56,vars:34,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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","disabled","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"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-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"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxFlex","48","fxLayoutAlign","start end"],["tabindex","6","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","48","tabindex","7","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["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,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e.NdJ("click",function(){return i.onClose()}),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7,8),e.NdJ("submit",function(){return i.onOpenChannel()})("reset",function(){return i.resetData()}),e.TgZ(11,"div",9),e.YNc(12,Us,8,8,"mat-form-field",10),e.qZA(),e.YNc(13,Ns,1,0,"ng-container",11),e.TgZ(14,"div",9),e.TgZ(15,"div",12),e.TgZ(16,"mat-form-field",13),e.TgZ(17,"input",14,15),e.NdJ("ngModelChange",function(l){return i.fundingAmount=l}),e.qZA(),e.TgZ(19,"mat-hint"),e._uU(20),e.ALo(21,"number"),e.qZA(),e.TgZ(22,"span",16),e._uU(23," Sats "),e.qZA(),e.YNc(24,ks,2,0,"mat-error",17),e.YNc(25,Is,2,1,"mat-error",17),e.qZA(),e.TgZ(26,"div",18),e.TgZ(27,"mat-slide-toggle",19),e.NdJ("ngModelChange",function(l){return i.isPrivate=l}),e._uU(28,"Private Channel"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(29,"mat-expansion-panel",20),e.NdJ("closed",function(){return i.onAdvancedPanelToggle(!0)})("opened",function(){return i.onAdvancedPanelToggle(!1)}),e.TgZ(30,"mat-expansion-panel-header"),e.TgZ(31,"mat-panel-title"),e.TgZ(32,"span"),e._uU(33),e.qZA(),e.qZA(),e.qZA(),e.TgZ(34,"div",21),e.TgZ(35,"div",22),e.TgZ(36,"div",23),e.TgZ(37,"mat-form-field",24),e.TgZ(38,"mat-select",25),e.NdJ("valueChange",function(l){return i.selFeeRate=l})("selectionChange",function(){return i.customFeeRate=null}),e.YNc(39,Ms,2,2,"mat-option",26),e.qZA(),e.qZA(),e.YNc(40,Ds,4,5,"mat-form-field",27),e.qZA(),e.TgZ(41,"div",28),e.TgZ(42,"mat-checkbox",29),e.NdJ("ngModelChange",function(l){return i.flgMinConf=l})("change",function(){return i.flgMinConf?i.selFeeRate=null:i.minConfValue=null}),e.qZA(),e.TgZ(43,"mat-form-field",30),e.TgZ(44,"input",31,32),e.NdJ("ngModelChange",function(l){return i.minConfValue=l}),e.qZA(),e.YNc(46,Ps,2,0,"mat-error",17),e.qZA(),e.qZA(),e.qZA(),e.YNc(47,Qs,9,8,"div",33),e.qZA(),e.qZA(),e.qZA(),e.YNc(48,Bs,3,2,"div",34),e.TgZ(49,"div",35),e.TgZ(50,"button",36),e._uU(51,"Clear Fields"),e.qZA(),e.TgZ(52,"button",37),e._uU(53,"Open Channel"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(54,Vs,1,1,"ng-template",null,38,e.W1O)),2&t){const o=e.MAs(18),l=e.MAs(55);e.xp6(5),e.Oqu(i.alertTitle),e.xp6(7),e.Q6J("ngIf",!i.peer&&i.peers&&i.peers.length>0),e.xp6(1),e.Q6J("ngTemplateOutlet",l),e.xp6(4),e.Q6J("ngModel",i.fundingAmount)("step",1e3)("min",1)("max",i.totalBalance)("disabled",i.flgUseAllBalance),e.xp6(3),e.AsE("Remaining Bal: ",e.lcZ(21,29,i.totalBalance-(i.fundingAmount?i.fundingAmount:0)),"",i.flgUseAllBalance?". Amount replaced by UTXO balance":"",""),e.xp6(4),e.Q6J("ngIf",(null==o.errors?null:o.errors.required)||!i.fundingAmount),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.max),e.xp6(2),e.Q6J("ngModel",i.isPrivate),e.xp6(6),e.Oqu(i.advancedTitle),e.xp6(4),e.Q6J("fxFlex","customperkb"!==i.selFeeRate||i.flgMinConf?"100":"48"),e.xp6(1),e.Q6J("value",i.selFeeRate)("disabled",i.flgMinConf),e.xp6(1),e.Q6J("ngForOf",i.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===i.selFeeRate&&!i.flgMinConf),e.xp6(2),e.Q6J("ngModel",i.flgMinConf)("ngClass",e.WLB(31,zs,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM,i.screenSize===i.screenSizeEnum.MD||i.screenSize===i.screenSizeEnum.LG||i.screenSize===i.screenSizeEnum.XL)),e.xp6(2),e.Q6J("ngModel",i.minConfValue)("step",1)("min",0)("required",i.flgMinConf)("disabled",!i.flgMinConf),e.xp6(2),e.Q6J("ngIf",i.flgMinConf&&!i.minConfValue),e.xp6(1),e.Q6J("ngIf",i.isCompatibleVersion),e.xp6(1),e.Q6J("ngIf",""!==i.channelConnectionError)}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,Z.dn,c._Y,c.JL,c.F,u.O5,u.tP,g.KE,I.Nt,c.wV,c.qQ,c.Fd,c.Fj,X.q,ws.F,c.Q7,c.JJ,c.On,g.bx,g.R9,oe.Rr,ee.ib,ee.yz,ee.yK,R.gD,u.sg,le.oG,u.mk,q.oO,V.h,Ue.ZL,c.oH,Ue.XC,B.ey,g.TO,R.$L,Q.gM,N.BN,G.d],pipes:[u.JJ,u.Ov],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();function Gs(n,a){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Open"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.openChannels)}}function Xs(n,a){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Pending/Inactive"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.pendingChannels)}}let Ws=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.store=i,this.commonService=o,this.router=l,this.openChannels=0,this.pendingChannels=0,this.selNode={},this.information={},this.peers=[],this.utxos=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending/Inactive"}],this.activeLink=0,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(t=>t instanceof C.Av)).subscribe(t=>{this.activeLink=this.links.findIndex(i=>i.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(h.OL).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(h.Wi).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.peers=t.peers}),this.store.select(h.T4).pipe((0,f.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(i=>"confirmed"===i.status),"value")}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[4])).subscribe(t=>{this.openChannels=t.activeChannels.length||0,this.pendingChannels=t.pendingChannels.length+t.inactiveChannels.length||0,this.logger.info(t)})}onOpenChannel(){const t={peers:this.peers,information:this.information,balance:this.totalBalance,utxos:this.utxos,isCompatibleVersion:this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")};this.store.dispatch((0,L.qR)({payload:{data:{alertTitle:"Open Channel",message:t,component:Ne}}}))}onSelectedTabChange(t){this.router.navigateByUrl("/cl/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channels-tables"]],decls:12,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return i.onOpenChannel()}),e._uU(3,"Open Channel"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-tab-group",4),e.NdJ("selectedIndexChange",function(l){return i.activeLink=l})("selectedTabChange",function(l){return i.onSelectedTabChange(l)}),e.TgZ(6,"mat-tab"),e.YNc(7,Gs,2,1,"ng-template",5),e.qZA(),e.TgZ(8,"mat-tab"),e.YNc(9,Xs,2,1,"ng-template",5),e.qZA(),e.qZA(),e.TgZ(10,"div",6),e._UZ(11,"router-outlet"),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(5),e.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.yH,p.Wh,U.lW,k.SP,k.uX,k.uD,C.lC,fe.k],styles:[""]}),n})();function Ks(n,a){if(1&n&&(e.TgZ(0,"div"),e.TgZ(1,"div",9),e.TgZ(2,"div",1),e.TgZ(3,"h4",11),e._uU(4,"Funding Transaction Id"),e.qZA(),e.TgZ(5,"span",12),e._uU(6),e.qZA(),e.qZA(),e.qZA(),e._UZ(7,"mat-divider",13),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(t.channel.funding_txid),e.xp6(1),e.Q6J("inset",!0)}}function $s(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Show Advanced"),e.qZA())}function js(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Hide Advanced"),e.qZA())}function el(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",23),e.NdJ("copied",function(o){return e.CHM(t),e.oxw().onCopyChanID(o)}),e._uU(1,"Copy Short Channel ID"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("payload",t.channel.short_channel_id)}}function tl(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(1,"OK"),e.qZA()}}const nl=function(n){return{"xs-scroll-y":n}},il=function(n,a){return{"mt-2":n,"mt-1":a}};let ke=(()=>{class n{constructor(t,i,o,l,d){this.dialogRef=t,this.data=i,this.logger=o,this.commonService=l,this.snackBar=d,this.faReceipt=x.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=s.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Short channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(F.mQ),e.Y36(O.v),e.Y36(j.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-information"]],decls:94,vars:40,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["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"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span",5),e._uU(6,"Channel Information"),e.qZA(),e.qZA(),e.TgZ(7,"button",6),e.NdJ("click",function(){return i.onClose()}),e._uU(8,"X"),e.qZA(),e.qZA(),e.TgZ(9,"mat-card-content",7),e.TgZ(10,"div",8),e.TgZ(11,"div",9),e.TgZ(12,"div",10),e.TgZ(13,"h4",11),e._uU(14,"Short Channel ID"),e.qZA(),e.TgZ(15,"span",12),e._uU(16),e.qZA(),e.qZA(),e.TgZ(17,"div",10),e.TgZ(18,"h4",11),e._uU(19,"Peer Alias"),e.qZA(),e.TgZ(20,"span",12),e._uU(21),e.qZA(),e.qZA(),e.qZA(),e._UZ(22,"mat-divider",13),e.TgZ(23,"div",9),e.TgZ(24,"div",1),e.TgZ(25,"h4",11),e._uU(26,"Channel ID"),e.qZA(),e.TgZ(27,"span",12),e._uU(28),e.qZA(),e.qZA(),e.qZA(),e._UZ(29,"mat-divider",13),e.TgZ(30,"div",9),e.TgZ(31,"div",1),e.TgZ(32,"h4",11),e._uU(33,"Peer Public Key"),e.qZA(),e.TgZ(34,"span",12),e._uU(35),e.qZA(),e.qZA(),e.qZA(),e._UZ(36,"mat-divider",13),e.TgZ(37,"div",9),e.TgZ(38,"div",14),e.TgZ(39,"h4",11),e._uU(40,"mSatoshi to Us"),e.qZA(),e.TgZ(41,"span",15),e._uU(42),e.ALo(43,"number"),e.qZA(),e.qZA(),e.TgZ(44,"div",14),e.TgZ(45,"h4",11),e._uU(46,"Spendable (mSats)"),e.qZA(),e.TgZ(47,"span",15),e._uU(48),e.ALo(49,"number"),e.qZA(),e.qZA(),e.TgZ(50,"div",14),e.TgZ(51,"h4",11),e._uU(52,"Total (mSats)"),e.qZA(),e.TgZ(53,"span",15),e._uU(54),e.ALo(55,"number"),e.qZA(),e.qZA(),e.TgZ(56,"div",14),e.TgZ(57,"h4",11),e._uU(58,"State"),e.qZA(),e.TgZ(59,"span",15),e._uU(60),e.qZA(),e.qZA(),e.qZA(),e._UZ(61,"mat-divider",13),e.TgZ(62,"div",9),e.TgZ(63,"div",14),e.TgZ(64,"h4",11),e._uU(65,"Our Reserve (Sats)"),e.qZA(),e.TgZ(66,"span",15),e._uU(67),e.ALo(68,"number"),e.qZA(),e.qZA(),e.TgZ(69,"div",14),e.TgZ(70,"h4",11),e._uU(71,"Their Reserve (Sats)"),e.qZA(),e.TgZ(72,"span",15),e._uU(73),e.ALo(74,"number"),e.qZA(),e.qZA(),e.TgZ(75,"div",14),e.TgZ(76,"h4",11),e._uU(77,"Connected"),e.qZA(),e.TgZ(78,"span",15),e._uU(79),e.qZA(),e.qZA(),e.TgZ(80,"div",14),e.TgZ(81,"h4",11),e._uU(82,"Private"),e.qZA(),e.TgZ(83,"span",15),e._uU(84),e.qZA(),e.qZA(),e.qZA(),e._UZ(85,"mat-divider",13),e.YNc(86,Ks,8,2,"div",16),e.TgZ(87,"div",17),e.TgZ(88,"button",18),e.NdJ("click",function(){return i.onShowAdvanced()}),e.YNc(89,$s,2,0,"p",19),e.YNc(90,js,2,0,"ng-template",null,20,e.W1O),e.qZA(),e.YNc(92,el,2,1,"button",21),e.YNc(93,tl,2,0,"button",22),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t){const o=e.MAs(91);e.xp6(4),e.Q6J("icon",i.faReceipt),e.xp6(5),e.Q6J("ngClass",e.VKq(35,nl,i.screenSize===i.screenSizeEnum.XS)),e.xp6(7),e.Oqu(i.channel.short_channel_id),e.xp6(5),e.Oqu(i.channel.alias),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(i.channel.channel_id),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(i.channel.id),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(43,25,i.channel.msatoshi_to_us)),e.xp6(6),e.Oqu(e.lcZ(49,27,i.channel.spendable_msatoshi)),e.xp6(6),e.Oqu(e.lcZ(55,29,i.channel.msatoshi_total)),e.xp6(6),e.Oqu(i.channel.state),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(68,31,i.channel.our_channel_reserve_satoshis)),e.xp6(6),e.Oqu(e.lcZ(74,33,i.channel.their_channel_reserve_satoshis)),e.xp6(6),e.Oqu(i.channel.connected?"Yes":"No"),e.xp6(5),e.Oqu(i.channel.private?"Yes":"No"),e.xp6(1),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngIf",i.showAdvanced),e.xp6(1),e.Q6J("ngClass",e.WLB(37,il,!i.showAdvanced,i.showAdvanced)),e.xp6(2),e.Q6J("ngIf",!i.showAdvanced)("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",i.showCopy),e.xp6(1),e.Q6J("ngIf",!i.showCopy)}},directives:[p.xw,p.Wh,p.yH,Z.dk,N.BN,U.lW,Z.dn,u.mk,q.oO,G.d,u.O5,V.h,te.y],pipes:[u.JJ],styles:[""]}),n})();function al(n,a){1&n&&e._UZ(0,"mat-progress-bar",33)}function ol(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Short Channel ID "),e.qZA())}function sl(n,a){if(1&n&&(e.TgZ(0,"span",40),e._UZ(1,"fa-icon",41),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEyeSlash)}}function ll(n,a){if(1&n&&(e.TgZ(0,"span",42),e._UZ(1,"fa-icon",41),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEye)}}const Ie=function(n){return{"max-width":n}};function rl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"div",36),e.YNc(2,sl,2,1,"span",37),e.YNc(3,ll,2,1,"span",38),e.TgZ(4,"span",39),e._uU(5),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(4,Ie,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),e.xp6(1),e.Q6J("ngIf",t.private),e.xp6(1),e.Q6J("ngIf",!t.private),e.xp6(2),e.Oqu(null==t?null:t.short_channel_id)}}function cl(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Alias "),e.qZA())}function ul(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"div",36),e.TgZ(2,"span",39),e._uU(3),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(2,Ie,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),e.xp6(2),e.Oqu(null==t?null:t.alias)}}function pl(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Connected "),e.qZA())}function ml(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function dl(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Private "),e.qZA())}function fl(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function _l(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," State "),e.qZA())}function hl(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.state,"")}}function gl(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Local Balance (Sats) "),e.qZA())}function Cl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,(null==t?null:t.msatoshi_to_us)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function xl(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Remote Balance (Sats) "),e.qZA())}function Tl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.xi3(3,1,(null==t?null:t.msatoshi_to_them)/1e3,(null==t?null:t.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function yl(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Total mSatoshis "),e.qZA())}function Zl(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.msatoshi_total)," ")}}function Al(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Spendable Satoshi "),e.qZA())}function Ll(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",44),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function vl(n,a){1&n&&(e.TgZ(0,"th",45),e._uU(1,"Balance Score "),e.qZA())}function bl(n,a){if(1&n&&(e.TgZ(0,"td",46),e.TgZ(1,"div",47),e.TgZ(2,"mat-hint",48),e._uU(3),e.ALo(4,"number"),e.qZA(),e.qZA(),e._UZ(5,"mat-progress-bar",49),e.qZA()),2&n){const t=a.$implicit;e.xp6(3),e.Oqu(e.lcZ(4,2,t.balancedness||0)),e.xp6(2),e.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function Sl(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",50),e.TgZ(1,"div",51),e.TgZ(2,"mat-select",52),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",53),e.NdJ("click",function(){return e.CHM(t),e.oxw().onChannelUpdate("all")}),e._uU(5,"Update Fee Policy"),e.qZA(),e.TgZ(6,"mat-option",53),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(7,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function wl(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",54),e.TgZ(1,"div",55),e.TgZ(2,"mat-select",56),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",53),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onChannelClick(d,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",53),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onViewRemotePolicy(l)}),e._uU(7,"View Remote Fee"),e.qZA(),e.TgZ(8,"mat-option",53),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onChannelUpdate(l)}),e._uU(9,"Update Fee Policy"),e.qZA(),e.TgZ(10,"mat-option",53),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onChannelClose(l)}),e._uU(11,"Close Channel"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function ql(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No peers connected. Add a peer in order to open a channel."),e.qZA())}function Fl(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No channel available."),e.qZA())}function Ol(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting channels..."),e.qZA())}function Rl(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Ul(n,a){if(1&n&&(e.TgZ(0,"td",57),e.YNc(1,ql,2,0,"p",58),e.YNc(2,Fl,2,0,"p",58),e.YNc(3,Ol,2,0,"p",58),e.YNc(4,Rl,2,1,"p",58),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Nl=function(n){return{"display-none":n}};function kl(n,a){if(1&n&&e._UZ(0,"tr",59),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Nl,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Il(n,a){1&n&&e._UZ(0,"tr",60)}function Ml(n,a){1&n&&e._UZ(0,"tr",61)}const El=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Dl=function(){return["no_peer"]};let Pl=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.store=i,this.rtlEffects=o,this.clEffects=l,this.commonService=d,this.faEye=x.Mdf,this.faEyeSlash=x.Aq,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=s.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi_to_us","msatoshi_to_them","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","actions"]):(this.flgSticky=!0,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","balancedness","actions"])}ngOnInit(){this.store.select(h.jK).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=t.activeChannels,this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){this.store.dispatch((0,T.$A)({payload:{uiMessage:s.m6.GET_REMOTE_POLICY,shortChannelID:t.short_channel_id,showError:!0}})),this.clEffects.setLookupCL.pipe((0,z.q)(1)).subscribe(i=>{if(0===i.length)return!1;let o={};o=i[0].source!==this.information.id?i[0]:i[1];const l=[[{key:"base_fee_millisatoshi",value:o.base_fee_millisatoshi,title:"Base Fees (mSats)",width:34,type:s.Gi.NUMBER},{key:"fee_per_millionth",value:o.fee_per_millionth,title:"Fee/Millionth",width:33,type:s.Gi.NUMBER},{key:"delay",value:o.delay,title:"Delay",width:33,type:s.Gi.NUMBER}]],d="Remote policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id);setTimeout(()=>{this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Remote Channel Policy",titleMessage:d,message:l}}}))},0)})}onChannelUpdate(t){"all"!==t&&"ONCHAIN"===t.state||("all"===t?(this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:1,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[1])).subscribe(o=>{o&&this.store.dispatch((0,T.pW)({payload:{baseFeeMsat:o[0].inputValue,feeRate:o[1].inputValue,channelId:"all"}}))})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0},this.store.dispatch((0,T.$A)({payload:{uiMessage:s.m6.GET_CHAN_POLICY,shortChannelID:t.short_channel_id,showError:!1}})),this.clEffects.setLookupCL.pipe((0,z.q)(1)).subscribe(i=>{this.myChanPolicy=i.length>0&&i[0].source===this.information.id?{fee_base_msat:i[0].base_fee_millisatoshi,fee_rate_milli_msat:i[0].fee_per_millionth}:i.length>1&&i[1].source===this.information.id?{fee_base_msat:i[1].base_fee_millisatoshi,fee_rate_milli_msat:i[1].fee_per_millionth}:{fee_base_msat:0,fee_rate_milli_msat:0},this.logger.info(this.myChanPolicy);const o="Update fee policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),l=[];setTimeout(()=>{this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:l,titleMessage:o,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:48,hintFunction:this.percentHintFunction}]}}}))},0)}),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[2])).subscribe(i=>{i&&this.store.dispatch((0,T.pW)({payload:{baseFeeMsat:i[0].inputValue,feeRate:i[1].inputValue,channelId:t.channel_id}}))})),this.applyFilter())}percentHintFunction(t){return(t/1e4).toString()+"%"}onChannelClose(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Close Channel",titleMessage:"Closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[3])).subscribe(i=>{i&&this.store.dispatch((0,T.BL)({payload:{id:t.id,channelId:t.channel_id,force:!1}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{channel:t,showCopy:!0,component:ke}}}))}loadChannelsTable(t){t.sort((i,o)=>i.active===o.active?0:o.active?1:-1),this.channels=new r.by([...t]),this.channels.filterPredicate=(i,o)=>((i.connected?"connected":"disconnected")+(i.channel_id?i.channel_id.toLowerCase():"")+(i.short_channel_id?i.short_channel_id.toLowerCase():"")+(i.id?i.id.toLowerCase():"")+(i.alias?i.alias.toLowerCase():"")+(i.private?"private":"public")+(i.state?i.state.toLowerCase():"")+(i.funding_txid?i.funding_txid.toLowerCase():"")+(i.msatoshi_to_us?i.msatoshi_to_us:"")+(i.msatoshi_total?i.msatoshi_total:"")+(i.their_channel_reserve_satoshis?i.their_channel_reserve_satoshis:"")+(i.our_channel_reserve_satoshis?i.our_channel_reserve_satoshis:"")+(i.spendable_msatoshi?i.spendable_msatoshi:"")).includes(o),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.channels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(W.V),e.Y36(re.s),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-open-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Channels")}])],decls:48,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_to_them"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["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-1",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"],["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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"input",4),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.YNc(5,al,1,0,"mat-progress-bar",5),e.TgZ(6,"div",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,ol,2,0,"th",10),e.YNc(11,rl,6,6,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,cl,2,0,"th",10),e.YNc(14,ul,4,4,"td",11),e.BQk(),e.ynx(15,13),e.YNc(16,pl,2,0,"th",10),e.YNc(17,ml,2,1,"td",11),e.BQk(),e.ynx(18,14),e.YNc(19,dl,2,0,"th",10),e.YNc(20,fl,2,1,"td",11),e.BQk(),e.ynx(21,15),e.YNc(22,_l,2,0,"th",10),e.YNc(23,hl,2,1,"td",11),e.BQk(),e.ynx(24,16),e.YNc(25,gl,2,0,"th",17),e.YNc(26,Cl,4,4,"td",11),e.BQk(),e.ynx(27,18),e.YNc(28,xl,2,0,"th",17),e.YNc(29,Tl,4,4,"td",11),e.BQk(),e.ynx(30,19),e.YNc(31,yl,2,0,"th",17),e.YNc(32,Zl,4,3,"td",11),e.BQk(),e.ynx(33,20),e.YNc(34,Al,2,0,"th",17),e.YNc(35,Ll,4,3,"td",11),e.BQk(),e.ynx(36,21),e.YNc(37,vl,2,0,"th",22),e.YNc(38,bl,6,4,"td",23),e.BQk(),e.ynx(39,24),e.YNc(40,Sl,8,0,"th",25),e.YNc(41,wl,12,0,"td",26),e.BQk(),e.ynx(42,27),e.YNc(43,Ul,5,4,"td",28),e.BQk(),e.YNc(44,kl,1,3,"tr",29),e.YNc(45,Il,1,0,"tr",30),e.YNc(46,Ml,1,0,"tr",31),e.qZA(),e.qZA(),e._UZ(47,"mat-paginator",32),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(1),e.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),e.xp6(2),e.Q6J("dataSource",i.channels)("ngClass",e.VKq(11,El,""!==i.errorMessage)),e.xp6(37),e.Q6J("matFooterRowDef",e.DdM(13,Dl)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,u.O5,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,N.BN,g.bx,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-short_channel_id[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_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-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();const Jl=["outputIdx"];function Ql(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Output Index required."),e.qZA())}function Yl(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid index value."),e.qZA())}function Bl(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function Hl(n,a){if(1&n&&(e.TgZ(0,"div",27),e._UZ(1,"fa-icon",13),e.TgZ(2,"span"),e._uU(3),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.bumpFeeError)}}let Vl=(()=>{class n{constructor(t,i,o,l,d,v){this.actions=t,this.dialogRef=i,this.data=o,this.store=l,this.logger=d,this.snackBar=v,this.newAddress="",this.fees=null,this.outputIndex=null,this.faCopy=x.kZ_,this.faInfoCircle=x.sqG,this.faExclamationTriangle=x.eHv,this.bumpFeeError="",this.unSubs=[new m.x,new m.x]}set payReq(t){t&&(this.outputIdx=t)}ngOnInit(){this.bumpFeeChannel=this.data.channel}onBumpFee(){if(!this.outputIndex&&0!==this.outputIndex||!this.fees)return!0;this.bumpFeeError="",this.store.dispatch((0,T._E)({payload:s._t[0]})),this.actions.pipe((0,D.h)(t=>t.type===s.sW.SET_NEW_ADDRESS_CL),(0,z.q)(1)).subscribe(t=>{this.store.dispatch((0,T.Wi)({payload:{address:t.payload,satoshis:"all",feeRate:this.fees,utxos:[this.bumpFeeChannel.funding_txid+":"+this.outputIndex.toString()]}}))}),this.actions.pipe((0,D.h)(t=>t.type===s.sW.SET_CHANNEL_TRANSACTION_RES_CL),(0,z.q)(1)).subscribe(t=>{this.store.dispatch((0,L.jW)({payload:"Successfully bumped the fee. Use the block explorer to verify transaction."})),this.dialogRef.close()}),this.actions.pipe((0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL),(0,f.R)(this.unSubs[0])).subscribe(t=>{t.payload.status===s.Bn.ERROR&&("SetChannelTransaction"===t.payload.action||"GenerateNewAddress"===t.payload.action)&&(this.logger.error(t.payload.message),this.bumpFeeError=t.payload.message)})}onCopyID(t){this.snackBar.open("Transaction ID copied.")}resetData(){this.bumpFeeError="",this.fees=null,this.outputIndex=null,this.outputIdx.control.setErrors(null)}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(H.eX),e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(F.mQ),e.Y36(j.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-bump-fee"]],viewQuery:function(t,i){if(1&t&&e.Gf(Jl,5),2&t){let o;e.iGM(o=e.CRH())&&(i.payReq=o.first)}},decls:47,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["matSuffix","","rtlClipboard","","matTooltip","Copy transaction ID",1,"ml-1",3,"icon","payload","copied"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],[1,"pl-1"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","49"],["autoFocus","","matInput","","placeholder","Output Index","type","number","tabindex","1","required","","name","outputIdx",3,"ngModel","step","min","ngModelChange"],["outputIdx","ngModel"],[4,"ngIf"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","fees","required","","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","tabindex","5","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","6",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"]],template:function(t,i){if(1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Bump Fee"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e.NdJ("click",function(){return i.onClose()}),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7),e.TgZ(10,"div",8),e.TgZ(11,"p",9),e._uU(12),e.TgZ(13,"fa-icon",10),e.NdJ("copied",function(l){return i.onCopyID(l)}),e.qZA(),e.qZA(),e.TgZ(14,"div",11),e.TgZ(15,"div",12),e._UZ(16,"fa-icon",13),e.TgZ(17,"span",14),e._uU(18,"Bumping fee on pending open channels is an advanced feature, attempt it only if you are familiar with the functionality of Bitcoin transactions. "),e.TgZ(19,"div"),e._uU(20,"Before attempting fee bump ensure the following:"),e.qZA(),e.TgZ(21,"div",15),e._uU(22,"1: Use a Bitcoin block explorer to ensure that channel opening transaction is not confirmed."),e.qZA(),e.TgZ(23,"div",15),e._uU(24,"2: The channel opening transaction must have a sizable change output, which can be spent further. The fee cannot be bumped without the change output."),e.qZA(),e.TgZ(25,"div",15),e._uU(26,"3: Find the index value of the change output via a block explorer."),e.qZA(),e.TgZ(27,"div",15),e._uU(28,"4: Enter the index value of the change output in the form below and the desired fee rate."),e.qZA(),e.TgZ(29,"div",15),e._uU(30,"5: Upon successful fee bump, use your block explorer to track the child transaction in the mempool, which should be linked with the change output transaction."),e.qZA(),e.qZA(),e.qZA(),e.TgZ(31,"div",16),e.TgZ(32,"mat-form-field",17),e.TgZ(33,"input",18,19),e.NdJ("ngModelChange",function(l){return i.outputIndex=l}),e.qZA(),e.YNc(35,Ql,2,0,"mat-error",20),e.YNc(36,Yl,2,0,"mat-error",20),e.qZA(),e.TgZ(37,"mat-form-field",17),e.TgZ(38,"input",21,22),e.NdJ("ngModelChange",function(l){return i.fees=l}),e.qZA(),e.YNc(40,Bl,2,0,"mat-error",20),e.qZA(),e.qZA(),e.YNc(41,Hl,4,2,"div",23),e.qZA(),e.qZA(),e.TgZ(42,"div",24),e.TgZ(43,"button",25),e.NdJ("click",function(){return i.resetData()}),e._uU(44,"Clear"),e.qZA(),e.TgZ(45,"button",26),e.NdJ("click",function(){return i.onBumpFee()}),e._uU(46),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t){const o=e.MAs(34);e.xp6(12),e.hij("Bump fee for transaction id: ",null==i.bumpFeeChannel?null:i.bumpFeeChannel.funding_txid," "),e.xp6(1),e.Q6J("icon",i.faCopy)("payload",null==i.bumpFeeChannel?null:i.bumpFeeChannel.funding_txid),e.xp6(3),e.Q6J("icon",i.faInfoCircle),e.xp6(17),e.Q6J("ngModel",i.outputIndex)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",null==o.errors?null:o.errors.required),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.pendingChannelOutputIndex),e.xp6(2),e.Q6J("ngModel",i.fees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!i.fees),e.xp6(1),e.Q6J("ngIf",""!==i.bumpFeeError),e.xp6(5),e.Oqu(""!==i.bumpFeeError?"Retry Bump Fee":"Bump Fee")}},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,Z.dn,c._Y,c.JL,c.F,N.BN,g.R9,te.y,Q.gM,g.KE,I.Nt,c.wV,c.qQ,c.Fj,X.q,V.h,c.Q7,c.JJ,c.On,u.O5,g.TO],styles:[""]}),n})();function zl(n,a){1&n&&e._UZ(0,"mat-progress-bar",30)}function Gl(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Short Channel ID "),e.qZA())}function Xl(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.short_channel_id,"")}}function Wl(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Alias "),e.qZA())}function Kl(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.alias)}}function $l(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Connected "),e.qZA())}function jl(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function er(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," Private "),e.qZA())}function tr(n,a){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function nr(n,a){1&n&&(e.TgZ(0,"th",31),e._uU(1," State "),e.qZA())}const ir=function(n){return{"max-width":n}};function ar(n,a){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(2,ir,i.screenSize===i.screenSizeEnum.XS?"10rem":"")),e.xp6(1),e.hij(" ",i.CLChannelPendingState[null==t?null:t.state]," ")}}function or(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," mSatoshi To Us "),e.qZA())}function sr(n,a){if(1&n&&(e.TgZ(0,"td",32),e.TgZ(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.msatoshi_to_us)," ")}}function lr(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Total (Sats) "),e.qZA())}function rr(n,a){if(1&n&&(e.TgZ(0,"td",32),e.TgZ(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,(null==t?null:t.msatoshi_total)/1e3)," ")}}function cr(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1," Spendable Satoshi "),e.qZA())}function ur(n,a){if(1&n&&(e.TgZ(0,"td",32),e.TgZ(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function pr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",36),e.TgZ(1,"div",37),e.TgZ(2,"mat-select",38),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function mr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",39),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onChannelClose(o)}),e._uU(1,"Close Channel"),e.qZA()}}function dr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",39),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onBumpFee(o)}),e._uU(1,"Bump Fee"),e.qZA()}}function fr(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",40),e.TgZ(1,"div",37),e.TgZ(2,"mat-select",41),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onChannelClick(d,o)}),e._uU(5,"View Info"),e.qZA(),e.YNc(6,mr,2,0,"mat-option",42),e.YNc(7,dr,2,0,"mat-option",42),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.xp6(6),e.Q6J("ngIf",i.isCompatibleVersion&&("CHANNELD_SHUTTING_DOWN"===t.state||"CLOSINGD_SIGEXCHANGE"===t.state||!t.connected&&"CHANNELD_NORMAL"===t.state)),e.xp6(1),e.Q6J("ngIf","CHANNELD_AWAITING_LOCKIN"===t.state)}}function _r(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No peers connected. Add a peer in order to open a channel."),e.qZA())}function hr(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending/inactive channel available."),e.qZA())}function gr(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending/inactive channels..."),e.qZA())}function Cr(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function xr(n,a){if(1&n&&(e.TgZ(0,"td",43),e.YNc(1,_r,2,0,"p",44),e.YNc(2,hr,2,0,"p",44),e.YNc(3,gr,2,0,"p",44),e.YNc(4,Cr,2,1,"p",44),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Tr=function(n){return{"display-none":n}};function yr(n,a){if(1&n&&e._UZ(0,"tr",45),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Tr,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Zr(n,a){1&n&&e._UZ(0,"tr",46)}function Ar(n,a){1&n&&e._UZ(0,"tr",47)}const Lr=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},vr=function(){return["no_peer"]};let br=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.store=i,this.rtlEffects=o,this.commonService=l,this.isCompatibleVersion=!1,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=s.vn,this.selFilter="",this.flgSticky=!1,this.CLChannelPendingState=s.uX,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","state","actions"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"])}ngOnInit(){this.store.select(h.jK).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.information.api_version&&(this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.api_version,"0.4.2")),this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(h.ZW).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=[...t.pendingChannels,...t.inactiveChannels],this.channelsData=this.channelsData.sort((i,o)=>this.CLChannelPendingState[i.state]>=this.CLChannelPendingState[o.state]?1:-1),this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onBumpFee(t){this.store.dispatch((0,L.qR)({payload:{data:{channel:t,component:Vl}}}))}onChannelClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{channel:t,showCopy:!0,component:ke}}}))}onChannelClose(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Force Close Channel",titleMessage:"Force closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Force Close"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[2])).subscribe(i=>{i&&this.store.dispatch((0,T.BL)({payload:{id:t.id,channelId:t.channel_id,force:!0}}))})}loadChannelsTable(t){t.sort((i,o)=>i.active===o.active?0:o.active?1:-1),this.channels=new r.by([...t]),this.channels.filterPredicate=(i,o)=>((i.connected?"connected":"disconnected")+(i.channel_id?i.channel_id.toLowerCase():"")+(i.short_channel_id?i.short_channel_id.toLowerCase():"")+(i.id?i.id.toLowerCase():"")+(i.alias?i.alias.toLowerCase():"")+(i.private?"private":"public")+(i.state&&this.CLChannelPendingState[i.state]?this.CLChannelPendingState[i.state].toLowerCase():"")+(i.funding_txid?i.funding_txid.toLowerCase():"")+(i.msatoshi_to_us?i.msatoshi_to_us:"")+(i.msatoshi_total?i.msatoshi_total:"")+(i.their_channel_reserve_satoshis?i.their_channel_reserve_satoshis:"")+(i.our_channel_reserve_satoshis?i.our_channel_reserve_satoshis:"")+(i.spendable_msatoshi?i.spendable_msatoshi:"")).includes(o),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(i,o)=>"state"===o?this.CLChannelPendingState[i.state]:i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]: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,"Pending-inactive-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(W.V),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-channel-pending-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Channels")}])],decls:42,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pr-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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["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,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pr-3"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"input",4),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.YNc(5,zl,1,0,"mat-progress-bar",5),e.TgZ(6,"div",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,Gl,2,0,"th",10),e.YNc(11,Xl,2,1,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Wl,2,0,"th",10),e.YNc(14,Kl,2,1,"td",11),e.BQk(),e.ynx(15,13),e.YNc(16,$l,2,0,"th",10),e.YNc(17,jl,2,1,"td",11),e.BQk(),e.ynx(18,14),e.YNc(19,er,2,0,"th",10),e.YNc(20,tr,2,1,"td",11),e.BQk(),e.ynx(21,15),e.YNc(22,nr,2,0,"th",10),e.YNc(23,ar,2,4,"td",16),e.BQk(),e.ynx(24,17),e.YNc(25,or,2,0,"th",18),e.YNc(26,sr,4,3,"td",11),e.BQk(),e.ynx(27,19),e.YNc(28,lr,2,0,"th",18),e.YNc(29,rr,4,3,"td",11),e.BQk(),e.ynx(30,20),e.YNc(31,cr,2,0,"th",18),e.YNc(32,ur,4,3,"td",11),e.BQk(),e.ynx(33,21),e.YNc(34,pr,6,0,"th",22),e.YNc(35,fr,8,2,"td",23),e.BQk(),e.ynx(36,24),e.YNc(37,xr,5,4,"td",25),e.BQk(),e.YNc(38,yr,1,3,"tr",26),e.YNc(39,Zr,1,0,"tr",27),e.YNc(40,Ar,1,0,"tr",28),e.qZA(),e.qZA(),e._UZ(41,"mat-paginator",29),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(1),e.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),e.xp6(2),e.Q6J("dataSource",i.channels)("ngClass",e.VKq(11,Lr,""!==i.errorMessage)),e.xp6(31),e.Q6J("matFooterRowDef",e.DdM(13,vr)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,u.O5,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-state[_ngcontent-%COMP%]{flex:1 1 15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();const Sr=["peersForm"],wr=["stepper"];function qr(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.peerFormLabel)}}function Fr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Address is required."),e.qZA())}function Or(n,a){if(1&n&&(e.TgZ(0,"div",40),e._UZ(1,"fa-icon",41),e.TgZ(2,"span"),e._uU(3),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.peerConnectionError)}}function Rr(n,a){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.channelFormLabel)}}function Ur(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Nr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount must be a positive number."),e.qZA())}function kr(n,a){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function Ir(n,a){if(1&n&&(e.TgZ(0,"mat-option",42),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.Q6J("value",t.feeRateId),e.xp6(1),e.hij(" ",t.feeRateType," ")}}function Mr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fee Rate is required."),e.qZA())}function Er(n,a){if(1&n&&(e.TgZ(0,"mat-form-field",43),e._UZ(1,"input",44),e.YNc(2,Mr,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("step",.1)("min",0),e.xp6(1),e.Q6J("ngIf","customperkb"===t.channelFormGroup.controls.selFeeRate.value&&!t.channelFormGroup.controls.flgMinConf.value&&!t.channelFormGroup.controls.customFeeRate.value)}}function Dr(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Min Confirmation Blocks is required."),e.qZA())}function Pr(n,a){if(1&n&&(e.TgZ(0,"div",40),e._UZ(1,"fa-icon",41),e.TgZ(2,"span"),e._uU(3),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.channelConnectionError)}}const Jr=function(n,a){return{"mr-6":n,"mr-2":a}};let Qr=(()=>{class n{constructor(t,i,o,l,d,v,J){this.dialogRef=t,this.data=i,this.store=o,this.formBuilder=l,this.actions=d,this.logger=v,this.commonService=J,this.faExclamationTriangle=x.eHv,this.peerAddress="",this.totalBalance=0,this.feeRateTypes=s.vn,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.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.id&&this.data.message.peer.netaddr?this.data.message.peer.id+"@"+this.data.message.peer.netaddr:this.data.message.peer&&this.data.message.peer.id&&!this.data.message.peer.netaddr?this.data.message.peer.id:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[c.kI.required]],peerAddress:[this.peerAddress,[c.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[c.kI.required,c.kI.min(1),c.kI.max(this.totalBalance)]],isPrivate:[!1],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}],hiddenAmount:["",[c.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.flgMinConf.valueChanges.pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{t?(this.channelFormGroup.controls.selFeeRate.setValue(null),this.channelFormGroup.controls.selFeeRate.disable(),this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.minConfValue.reset(),this.channelFormGroup.controls.minConfValue.enable(),this.channelFormGroup.controls.minConfValue.setValidators([c.kI.required])):(this.channelFormGroup.controls.selFeeRate.enable(),this.channelFormGroup.controls.minConfValue.setValue(null),this.channelFormGroup.controls.minConfValue.disable(),this.channelFormGroup.controls.minConfValue.setValidators(null))}),this.channelFormGroup.controls.selFeeRate.valueChanges.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.customFeeRate.reset(),this.channelFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.channelFormGroup.controls.flgMinConf.value?null:[c.kI.required])}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.NEWLY_ADDED_PEER_CL||t.type===s.sW.FETCH_CHANNELS_CL||t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.NEWLY_ADDED_PEER_CL&&(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===s.sW.FETCH_CHANNELS_CL&&this.dialogRef.close(),t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&t.payload.status===s.Bn.ERROR&&("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((0,T.El)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||this.channelFormGroup.controls.flgMinConf.value&&!this.channelFormGroup.controls.minConfValue.value)return!0;this.channelConnectionError="",this.store.dispatch((0,T.YX)({payload:{peerId:this.newlyAddedPeer.id,satoshis:this.channelFormGroup.controls.fundingAmount.value,announce:!this.channelFormGroup.controls.isPrivate.value,feeRate:"customperkb"===this.channelFormGroup.controls.selFeeRate.value&&!this.channelFormGroup.controls.flgMinConf.value&&this.channelFormGroup.controls.customFeeRate.value?1e3*this.channelFormGroup.controls.customFeeRate.value+"perkb":this.channelFormGroup.controls.selFeeRate.value,minconf:this.channelFormGroup.controls.flgMinConf.value?this.channelFormGroup.controls.minConfValue.value:null}}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.selectedIndex){default: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.id):"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.id):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}t.selectedIndex{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(c.qu),e.Y36(H.eX),e.Y36(F.mQ),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-connect-peer"]],viewQuery:function(t,i){if(1&t&&(e.Gf(Sr,5),e.Gf(wr,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.form=o.first),e.iGM(o=e.CRH())&&(i.stepper=o.first)}},decls:57,vars:30,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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",""],["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-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","ngSubmit"],["matStepLabel","","disabled","true"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row","fxFlex","100","fxLayoutAlign.gt-sm","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","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["fxFlex","98"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["mat-button","","color","primary","tabindex","8","type","submit"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vB)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Connect to a new peer"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e.NdJ("click",function(){return i.onClose()}),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"div",7),e.TgZ(10,"mat-vertical-stepper",8,9),e.NdJ("selectionChange",function(l){return i.stepSelectionChanged(l)}),e.TgZ(12,"mat-step",10),e.TgZ(13,"form",11),e.YNc(14,qr,1,1,"ng-template",12),e.TgZ(15,"mat-form-field",1),e._UZ(16,"input",13),e.YNc(17,Fr,2,0,"mat-error",14),e.qZA(),e.YNc(18,Or,4,2,"div",15),e.TgZ(19,"div",16),e.TgZ(20,"button",17),e.NdJ("click",function(){return i.onConnectPeer()}),e._uU(21),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(22,"mat-step",10),e.TgZ(23,"form",18),e.NdJ("ngSubmit",function(){return i.onOpenChannel()}),e.YNc(24,Rr,1,1,"ng-template",19),e.TgZ(25,"div",20),e.TgZ(26,"div",21),e.TgZ(27,"mat-form-field",22),e._UZ(28,"input",23),e.TgZ(29,"mat-hint"),e._uU(30),e.qZA(),e.TgZ(31,"span",24),e._uU(32," Sats "),e.qZA(),e.YNc(33,Ur,2,0,"mat-error",14),e.YNc(34,Nr,2,0,"mat-error",14),e.YNc(35,kr,2,1,"mat-error",14),e.qZA(),e.TgZ(36,"div",25),e.TgZ(37,"mat-slide-toggle",26),e._uU(38,"Private Channel"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(39,"div",27),e.TgZ(40,"div",28),e.TgZ(41,"mat-form-field",29),e.TgZ(42,"mat-select",30),e.YNc(43,Ir,2,2,"mat-option",31),e.qZA(),e.qZA(),e.YNc(44,Er,3,3,"mat-form-field",32),e.qZA(),e.TgZ(45,"div",33),e._UZ(46,"mat-checkbox",34),e.TgZ(47,"mat-form-field",35),e._UZ(48,"input",36),e.YNc(49,Dr,2,0,"mat-error",14),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(50,Pr,4,2,"div",15),e.TgZ(51,"div",16),e.TgZ(52,"button",37),e._uU(53),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(54,"div",38),e.TgZ(55,"button",39),e._uU(56),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(10),e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",i.peerFormGroup)("editable",i.flgEditable),e.xp6(1),e.Q6J("formGroup",i.peerFormGroup),e.xp6(4),e.Q6J("ngIf",null==i.peerFormGroup.controls.peerAddress.errors?null:i.peerFormGroup.controls.peerAddress.errors.required),e.xp6(1),e.Q6J("ngIf",""!==i.peerConnectionError),e.xp6(3),e.Oqu(""!==i.peerConnectionError?"Retry":"Add Peer"),e.xp6(1),e.Q6J("stepControl",i.channelFormGroup)("editable",i.flgEditable),e.xp6(1),e.Q6J("formGroup",i.channelFormGroup),e.xp6(5),e.Q6J("step",1e3),e.xp6(2),e.hij("Remaining Bal: ",i.totalBalance-(i.channelFormGroup.controls.fundingAmount.value?i.channelFormGroup.controls.fundingAmount.value:0),""),e.xp6(3),e.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.required),e.xp6(1),e.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.min),e.xp6(1),e.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.max),e.xp6(6),e.Q6J("fxFlex","customperkb"!==i.channelFormGroup.controls.selFeeRate.value||i.channelFormGroup.controls.flgMinConf.value?"100":"48"),e.xp6(2),e.Q6J("ngForOf",i.feeRateTypes),e.xp6(1),e.Q6J("ngIf","customperkb"===i.channelFormGroup.controls.selFeeRate.value&&!i.channelFormGroup.controls.flgMinConf.value),e.xp6(2),e.Q6J("ngClass",e.WLB(27,Jr,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM,i.screenSize===i.screenSizeEnum.MD||i.screenSize===i.screenSizeEnum.LG||i.screenSize===i.screenSizeEnum.XL)),e.xp6(2),e.Q6J("step",1)("min",0)("required",i.channelFormGroup.controls.flgMinConf.value),e.xp6(1),e.Q6J("ngIf",i.channelFormGroup.controls.flgMinConf.value&&!i.channelFormGroup.controls.minConfValue.value),e.xp6(1),e.Q6J("ngIf",""!==i.channelConnectionError),e.xp6(3),e.Oqu(""!==i.channelConnectionError?"Retry":"Open Channel"),e.xp6(2),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(null!=i.newlyAddedPeer&&i.newlyAddedPeer.id?"Do It Later":"Close"))},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,Z.dn,K.Vq,K.C0,c._Y,c.JL,c.sg,K.VY,g.KE,I.Nt,c.Fj,V.h,c.JJ,c.u,c.Q7,u.O5,c.wV,g.bx,g.R9,oe.Rr,R.gD,u.sg,le.oG,u.mk,q.oO,c.qQ,X.q,M.ZT,g.TO,N.BN,B.ey],styles:[""]}),n})();function Yr(n,a){1&n&&e._UZ(0,"mat-progress-bar",32)}function Br(n,a){1&n&&(e.TgZ(0,"th",33),e._uU(1," Alias "),e.qZA())}const Me=function(n){return{"mr-0":n}};function Hr(n,a){if(1&n&&e._UZ(0,"span",37),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Me,t.screenSize===t.screenSizeEnum.XS))}}function Vr(n,a){if(1&n&&e._UZ(0,"span",38),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Me,t.screenSize===t.screenSizeEnum.XS))}}const _e=function(n){return{"max-width":n}};function zr(n,a){if(1&n&&(e.TgZ(0,"td",34),e.YNc(1,Hr,1,3,"span",35),e.YNc(2,Vr,1,3,"span",36),e._uU(3),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(4,_e,i.screenSize===i.screenSizeEnum.XS?"10rem":"40rem")),e.xp6(1),e.Q6J("ngIf",null==t?null:t.connected),e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.connected)),e.xp6(1),e.hij(" ",null==t?null:t.alias," ")}}function Gr(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," ID "),e.qZA())}function Xr(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(2,_e,i.screenSize===i.screenSizeEnum.XS?"10rem":"40rem")),e.xp6(1),e.hij(" ",null==t?null:t.id," ")}}function Wr(n,a){1&n&&(e.TgZ(0,"th",33),e._uU(1," Network Address "),e.qZA())}function Kr(n,a){1&n&&(e.TgZ(0,"span"),e._uU(1,","),e._UZ(2,"br"),e.qZA())}function $r(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.YNc(2,Kr,3,0,"span",42),e.qZA()),2&n){const t=a.$implicit,i=a.last;e.xp6(1),e.Oqu(t),e.xp6(1),e.Q6J("ngIf",!i)}}function jr(n,a){if(1&n&&(e.TgZ(0,"td",34),e.YNc(1,$r,3,2,"span",41),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngStyle",e.VKq(2,_e,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),e.xp6(1),e.Q6J("ngForOf",null==t?null:t.netaddr)}}function ec(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",43),e.TgZ(1,"div",44),e.TgZ(2,"mat-select",45),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",46),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function tc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",46),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onPeerDetach(o)}),e._uU(1,"Disconnect"),e.qZA()}}function nc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",46),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onConnectPeer(o)}),e._uU(1,"Reconnect"),e.qZA()}}function ic(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",47),e.TgZ(1,"div",48),e.TgZ(2,"mat-select",45),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",46),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onPeerClick(d,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",46),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onOpenChannel(l)}),e._uU(7,"Open Channel"),e.qZA(),e.YNc(8,tc,2,0,"mat-option",49),e.YNc(9,nc,2,0,"mat-option",49),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit;e.xp6(8),e.Q6J("ngIf",t.connected),e.xp6(1),e.Q6J("ngIf",!t.connected)}}function ac(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No connected peer."),e.qZA())}function oc(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting peers..."),e.qZA())}function sc(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function lc(n,a){if(1&n&&(e.TgZ(0,"td",50),e.YNc(1,ac,2,0,"p",42),e.YNc(2,oc,2,0,"p",42),e.YNc(3,sc,2,1,"p",42),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const rc=function(n){return{"display-none":n}};function cc(n,a){if(1&n&&e._UZ(0,"tr",51),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,rc,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function uc(n,a){1&n&&e._UZ(0,"tr",52)}function pc(n,a){1&n&&e._UZ(0,"tr",53)}const mc=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},dc=function(){return["no_peer"]};let fc=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.store=i,this.rtlEffects=o,this.actions=l,this.commonService=d,this.faUsers=x.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","id","netaddr","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","id","netaddr","actions"])}ngOnInit(){this.store.select(h.Ao).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.availableBalance=t.balance.totalBalance||0}),this.store.select(h.Wi).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.peersData=t.peers||[],this.peersData.length>0&&this.loadPeersTable(this.peersData),this.logger.info(t)}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.SET_PEERS_CL)).subscribe(t=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.id,message:[[{key:"id",value:t.id,title:"Public Key",width:100}],[{key:"netaddr",value:t.netaddr,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:50},{key:"connected",value:t.connected?"True":"False",title:"Connected",width:50}]]}}}))}onConnectPeer(t){this.store.dispatch((0,L.qR)({payload:{data:{message:{peer:t.id?t:null,information:this.information,balance:this.availableBalance},component:Qr}}}))}onOpenChannel(t){this.store.dispatch((0,L.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:Ne}}}))}onPeerDetach(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.id),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[3])).subscribe(o=>{o&&this.store.dispatch((0,T.z)({payload:{id:t.id,force:!1}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(t){this.peers=new r.by([...t]),this.peers.sortingDataAccessor=(i,o)=>{if("netaddr"===o){if(i.netaddr&&i.netaddr[0]){const l=i.netaddr[0].toString().split(".");return l[0]?+l[0]:i.netaddr[0]}return""}return i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null},this.peers.sort=this.sort,this.peers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(W.V),e.Y36(H.eX),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-peers"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Peers")}])],decls:36,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["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,"page-sub-title-container"],["fxFlex","30","fxFlex.gt-xs","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",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","",3,"ngStyle",4,"matCellDef"],["matColumnDef","id"],["mat-header-cell","","class","px-3","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","netaddr"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",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-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],[4,"ngFor","ngForOf"],[4,"ngIf"],["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"],["fxFlex","100","fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.TgZ(3,"button",3),e.NdJ("click",function(){return i.onConnectPeer({})}),e._uU(4,"Add Peer"),e.qZA(),e.qZA(),e.TgZ(5,"div",4),e.TgZ(6,"div",5),e.TgZ(7,"div",6),e._UZ(8,"fa-icon",7),e.TgZ(9,"span",8),e._uU(10,"Connected Peers"),e.qZA(),e.qZA(),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"div",10),e.TgZ(13,"input",11),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.TgZ(14,"div",12),e.YNc(15,Yr,1,0,"mat-progress-bar",13),e.TgZ(16,"table",14,15),e.ynx(18,16),e.YNc(19,Br,2,0,"th",17),e.YNc(20,zr,4,6,"td",18),e.BQk(),e.ynx(21,19),e.YNc(22,Gr,2,0,"th",20),e.YNc(23,Xr,2,4,"td",21),e.BQk(),e.ynx(24,22),e.YNc(25,Wr,2,0,"th",17),e.YNc(26,jr,2,4,"td",18),e.BQk(),e.ynx(27,23),e.YNc(28,ec,6,0,"th",24),e.YNc(29,ic,10,2,"td",25),e.BQk(),e.ynx(30,26),e.YNc(31,lc,4,3,"td",27),e.BQk(),e.YNc(32,cc,1,3,"tr",28),e.YNc(33,uc,1,0,"tr",29),e.YNc(34,pc,1,0,"tr",30),e.qZA(),e.qZA(),e._UZ(35,"mat-paginator",31),e.qZA(),e.qZA()),2&t&&(e.xp6(8),e.Q6J("icon",i.faUsers),e.xp6(5),e.Q6J("ngModel",i.selFilter),e.xp6(2),e.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.peers)("ngClass",e.VKq(12,mc,""!==i.errorMessage)),e.xp6(16),e.Q6J("matFooterRowDef",e.DdM(14,dc)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,c._Y,c.JL,c.F,U.lW,N.BN,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,u.sg,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-id[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:2rem}.mat-column-netaddr[_ngcontent-%COMP%]{flex:1 1 25%;width:25%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const _c=["queryRoutesForm"];function hc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Destination pubkey is required."),e.qZA())}function gc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Cc(n,a){1&n&&e._UZ(0,"mat-progress-bar",38)}function xc(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," ID "),e.qZA())}function Tc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.id," ")}}function yc(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," Alias "),e.qZA())}function Zc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.alias," ")}}function Ac(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," Channel "),e.qZA())}function Lc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.channel," ")}}function vc(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1," Direction "),e.qZA())}function bc(n,a){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.direction," ")}}function Sc(n,a){1&n&&(e.TgZ(0,"th",41),e._uU(1," Delay "),e.qZA())}function wc(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.delay)," ")}}function qc(n,a){1&n&&(e.TgZ(0,"th",41),e._uU(1," Amount (Sats) "),e.qZA())}function Fc(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,(null==t?null:t.msatoshi)/1e3)," ")}}function Oc(n,a){1&n&&(e.TgZ(0,"th",43),e._uU(1," Amount mSat "),e.qZA())}function Rc(n,a){if(1&n&&(e.TgZ(0,"td",44),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.amount_msat," ")}}function Uc(n,a){1&n&&(e.TgZ(0,"th",45),e.TgZ(1,"span",42),e._uU(2,"Actions"),e.qZA(),e.qZA())}function Nc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",44),e.TgZ(1,"button",46),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw().onHopClick(d,o)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function kc(n,a){1&n&&e._UZ(0,"tr",47)}function Ic(n,a){1&n&&e._UZ(0,"tr",48)}const Mc=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};let Ec=(()=>{class n{constructor(t,i,o){this.store=t,this.clEffects=i,this.commonService=o,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=x.FpQ,this.faExclamationTriangle=x.eHv,this.screenSize="",this.screenSizeEnum=s.cu,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi","actions"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","direction","msatoshi","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","direction","delay","msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","channel","direction","delay","msatoshi","actions"])}ngOnInit(){this.clEffects.setQueryRoutesCL.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.qrHops=new r.by([]),this.qrHops.data=[],t.routes&&t.routes.length&&t.routes.length>0?(this.flgLoading[0]=!1,this.qrHops=new r.by([...t.routes]),this.qrHops.data=t.routes):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.flgLoading[0]=!0,this.store.dispatch((0,T.WO)({payload:{destPubkey:this.destinationPubkey,amount:1e3*this.amount}}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"id",value:t.id,title:"ID",width:100,type:s.Gi.STRING}],[{key:"channel",value:t.channel,title:"Channel",width:50,type:s.Gi.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:s.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"mSatoshi",width:50,type:s.Gi.NUMBER},{key:"amount_msat",value:t.amount_msat,title:"Amount mSat",width:50,type:s.Gi.STRING}],[{key:"direction",value:t.direction,title:"Direction",width:50,type:s.Gi.STRING},{key:"delay",value:t.delay,title:"Delay",width:50,type:s.Gi.NUMBER}]]}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(b.yh),e.Y36(re.s),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-query-routes"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(_c,7)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.form=o.first)}},decls:54,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 Pubkey","name","destinationPubkey","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-1"],["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,"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","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","channel"],["matColumnDef","direction"],["matColumnDef","delay"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","amount_msat"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"pl-4","pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,i){if(1&t){const o=e.EpF();e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.NdJ("ngSubmit",function(){return e.CHM(o),e.MAs(2).form.valid&&i.onQueryRoutes()}),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span"),e._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),e.qZA(),e.qZA(),e.TgZ(7,"mat-form-field",5),e.TgZ(8,"input",6,7),e.NdJ("ngModelChange",function(d){return i.destinationPubkey=d}),e.qZA(),e.YNc(10,hc,2,0,"mat-error",8),e.qZA(),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"input",10),e.NdJ("ngModelChange",function(d){return i.amount=d}),e.qZA(),e.YNc(13,gc,2,0,"mat-error",8),e.qZA(),e.TgZ(14,"div",11),e.TgZ(15,"button",12),e.NdJ("click",function(){return i.resetData()}),e._uU(16,"Clear"),e.qZA(),e.TgZ(17,"button",13),e._uU(18,"Query Route"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(19,"div",14),e.TgZ(20,"div",15),e._UZ(21,"fa-icon",16),e.TgZ(22,"span",17),e._uU(23,"Transaction Route"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(24,"div",18),e.YNc(25,Cc,1,0,"mat-progress-bar",19),e.TgZ(26,"table",20,21),e.ynx(28,22),e.YNc(29,xc,2,0,"th",23),e.YNc(30,Tc,2,1,"td",24),e.BQk(),e.ynx(31,25),e.YNc(32,yc,2,0,"th",23),e.YNc(33,Zc,2,1,"td",24),e.BQk(),e.ynx(34,26),e.YNc(35,Ac,2,0,"th",23),e.YNc(36,Lc,2,1,"td",24),e.BQk(),e.ynx(37,27),e.YNc(38,vc,2,0,"th",23),e.YNc(39,bc,2,1,"td",24),e.BQk(),e.ynx(40,28),e.YNc(41,Sc,2,0,"th",29),e.YNc(42,wc,4,3,"td",24),e.BQk(),e.ynx(43,30),e.YNc(44,qc,2,0,"th",29),e.YNc(45,Fc,4,3,"td",24),e.BQk(),e.ynx(46,31),e.YNc(47,Oc,2,0,"th",32),e.YNc(48,Rc,2,1,"td",33),e.BQk(),e.ynx(49,34),e.YNc(50,Uc,3,0,"th",35),e.YNc(51,Nc,3,0,"td",33),e.BQk(),e.YNc(52,kc,1,0,"tr",36),e.YNc(53,Ic,1,0,"tr",37),e.qZA(),e.qZA(),e.qZA()}2&t&&(e.xp6(4),e.Q6J("icon",i.faExclamationTriangle),e.xp6(4),e.Q6J("ngModel",i.destinationPubkey),e.xp6(2),e.Q6J("ngIf",!i.destinationPubkey),e.xp6(2),e.Q6J("ngModel",i.amount)("step",1e3)("min",0),e.xp6(1),e.Q6J("ngIf",!i.amount),e.xp6(8),e.Q6J("icon",i.faRoute),e.xp6(4),e.Q6J("ngIf",!0===i.flgLoading[0]),e.xp6(1),e.Q6J("dataSource",i.qrHops)("ngClass",e.VKq(14,Mc,"error"===i.flgLoading[0])),e.xp6(26),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns))},directives:[p.xw,p.yH,c._Y,c.JL,c.F,p.Wh,N.BN,g.KE,I.Nt,c.Fj,c.Q7,c.JJ,c.On,u.O5,c.wV,c.qQ,X.q,U.lW,Y.$V,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.as,r.nj,g.TO,P.pW,r.ge,y.nU,r.ev,r.XQ,r.Gk],pipes:[u.JJ],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}"]}),n})();var Ee=_(8020);function Dc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}let Pc=(()=>{class n{constructor(t,i,o){this.dataService=t,this.snackBar=i,this.logger=o,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new m.x,new m.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.zbase})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(Ee.D),e.Y36(j.ux),e.Y36(F.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"textarea",4),e.NdJ("ngModelChange",function(l){return i.message=l})("keyup",function(){return i.onMessageChange()}),e.qZA(),e.YNc(5,Dc,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"div",6),e.TgZ(7,"button",7),e.NdJ("click",function(){return i.resetData()}),e._uU(8,"Clear Field"),e.qZA(),e.TgZ(9,"button",8),e.NdJ("click",function(){return i.onSign()}),e._uU(10,"Sign"),e.qZA(),e.qZA(),e._UZ(11,"mat-divider",9),e.TgZ(12,"div",10),e.TgZ(13,"p"),e._uU(14,"Generated Signature"),e.qZA(),e.qZA(),e.TgZ(15,"div",11),e._uU(16),e.qZA(),e.TgZ(17,"div",12),e.TgZ(18,"button",13),e.NdJ("copied",function(l){return i.onCopyField(l)}),e._uU(19,"Copy Signature"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.message),e.xp6(1),e.Q6J("ngIf",!i.message),e.xp6(6),e.Q6J("inset",!0),e.xp6(5),e.Oqu(i.signature),e.xp6(2),e.Q6J("payload",i.signature))},directives:[p.xw,p.yH,p.Wh,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.Q7,c.JJ,c.On,u.O5,U.lW,G.d,te.y,g.TO],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Jc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}function Qc(n,a){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Signature is required."),e.qZA())}function Yc(n,a){1&n&&(e.TgZ(0,"p",13),e.TgZ(1,"mat-icon",14),e._uU(2,"close"),e.qZA(),e._uU(3,"Verification failed, please double check message and signature"),e.qZA())}function Bc(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Pubkey Used"),e.qZA())}function Hc(n,a){if(1&n&&(e.TgZ(0,"div",20),e.TgZ(1,"p"),e._uU(2),e.qZA(),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.Oqu(null==t.verifyRes?null:t.verifyRes.pubkey)}}function Vc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",21),e.TgZ(1,"button",22),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyField(o)}),e._uU(2,"Copy Pubkey"),e.qZA(),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function zc(n,a){if(1&n&&(e.TgZ(0,"div",15),e._UZ(1,"mat-divider",16),e.TgZ(2,"div",17),e.YNc(3,Bc,2,0,"p",5),e.qZA(),e.YNc(4,Hc,3,1,"div",18),e.YNc(5,Vc,3,1,"div",19),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(2),e.Q6J("ngIf",t.verifyRes.verified),e.xp6(1),e.Q6J("ngIf",t.verifyRes.verified),e.xp6(1),e.Q6J("ngIf",t.verifyRes.verified)}}let Gc=(()=>{class n{constructor(t,i,o){this.dataService=t,this.snackBar=i,this.logger=o,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null},this.unSubs=[new m.x,new m.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){(this.verifiedMessage!==this.message||this.verifiedSignature!==this.signature)&&(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(Ee.D),e.Y36(j.ux),e.Y36(F.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"form",1,2),e.TgZ(3,"mat-form-field",3),e.TgZ(4,"textarea",4),e.NdJ("ngModelChange",function(l){return i.message=l})("keyup",function(){return i.onChange()}),e.qZA(),e.YNc(5,Jc,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"mat-form-field",3),e.TgZ(7,"input",6,7),e.NdJ("ngModelChange",function(l){return i.signature=l})("keyup",function(){return i.onChange()}),e.qZA(),e.YNc(9,Qc,2,0,"mat-error",5),e.qZA(),e.YNc(10,Yc,4,0,"p",8),e.TgZ(11,"div",9),e.TgZ(12,"button",10),e.NdJ("click",function(){return i.resetData()}),e._uU(13,"Clear Fields"),e.qZA(),e.TgZ(14,"button",11),e.NdJ("click",function(){return i.onVerify()}),e._uU(15,"Verify"),e.qZA(),e.qZA(),e.YNc(16,zc,6,4,"div",12),e.qZA(),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",i.message),e.xp6(1),e.Q6J("ngIf",!i.message),e.xp6(2),e.Q6J("ngModel",i.signature),e.xp6(2),e.Q6J("ngIf",!i.signature),e.xp6(1),e.Q6J("ngIf",i.showVerifyStatus&&!i.verifyRes.verified),e.xp6(6),e.Q6J("ngIf",i.showVerifyStatus&&i.verifyRes.verified))},directives:[p.xw,p.yH,p.Wh,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.Q7,c.JJ,c.On,u.O5,U.lW,g.TO,pe.Hw,G.d,te.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Xc(n,a){if(1&n&&(e.TgZ(0,"div",5),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function Wc(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e._UZ(1,"div",7),e.TgZ(2,"mat-form-field",8),e.TgZ(3,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().filterValue=o})("input",function(){return e.CHM(t),e.oxw().applyFilter()})("keyup",function(){return e.CHM(t),e.oxw().applyFilter()}),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.filterValue)}}function Kc(n,a){1&n&&e._UZ(0,"mat-progress-bar",33)}function $c(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Status"),e.qZA())}function jc(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.status)}}function eu(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Received Time"),e.qZA())}function tu(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/YYYY HH:mm"))}}function nu(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Resolved Time"),e.qZA())}function iu(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/YYYY HH:mm"))}}function au(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"In Channel"),e.qZA())}function ou(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.in_channel_alias)}}function su(n,a){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Out Channel"),e.qZA())}function lu(n,a){if(1&n&&(e.TgZ(0,"td",35),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.out_channel_alias)}}function ru(n,a){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Amount In (Sats)"),e.qZA())}function cu(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function uu(n,a){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Amount Out (Sats)"),e.qZA())}function pu(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function mu(n,a){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Fee (mSat)"),e.qZA())}function du(n,a){if(1&n&&(e.TgZ(0,"td",35),e.TgZ(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==t?null:t.fee))}}function fu(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",38),e.TgZ(1,"div",39),e.TgZ(2,"mat-select",40),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",41),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function _u(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",42),e.TgZ(1,"button",43),e.NdJ("click",function(o){const d=e.CHM(t).$implicit;return e.oxw(2).onForwardingEventClick(d,o)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function hu(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No forwarding history available."),e.qZA())}function gu(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting forwarding history..."),e.qZA())}function Cu(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function xu(n,a){if(1&n&&(e.TgZ(0,"td",44),e.YNc(1,hu,2,0,"p",45),e.YNc(2,gu,2,0,"p",45),e.YNc(3,Cu,2,1,"p",45),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Tu=function(n){return{"display-none":n}};function yu(n,a){if(1&n&&e._UZ(0,"tr",46),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Tu,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function Zu(n,a){1&n&&e._UZ(0,"tr",47)}function Au(n,a){1&n&&e._UZ(0,"tr",48)}const Lu=function(){return["no_event"]};function vu(n,a){if(1&n&&(e.TgZ(0,"div",10),e.YNc(1,Kc,1,0,"mat-progress-bar",11),e.TgZ(2,"table",12,13),e.ynx(4,14),e.YNc(5,$c,2,0,"th",15),e.YNc(6,jc,2,1,"td",16),e.BQk(),e.ynx(7,17),e.YNc(8,eu,2,0,"th",15),e.YNc(9,tu,3,4,"td",16),e.BQk(),e.ynx(10,18),e.YNc(11,nu,2,0,"th",15),e.YNc(12,iu,3,4,"td",16),e.BQk(),e.ynx(13,19),e.YNc(14,au,2,0,"th",15),e.YNc(15,ou,2,1,"td",16),e.BQk(),e.ynx(16,20),e.YNc(17,su,2,0,"th",15),e.YNc(18,lu,2,1,"td",16),e.BQk(),e.ynx(19,21),e.YNc(20,ru,2,0,"th",22),e.YNc(21,cu,4,4,"td",16),e.BQk(),e.ynx(22,23),e.YNc(23,uu,2,0,"th",22),e.YNc(24,pu,4,4,"td",16),e.BQk(),e.ynx(25,24),e.YNc(26,mu,2,0,"th",22),e.YNc(27,du,4,3,"td",16),e.BQk(),e.ynx(28,25),e.YNc(29,fu,6,0,"th",26),e.YNc(30,_u,3,0,"td",27),e.BQk(),e.ynx(31,28),e.YNc(32,xu,4,3,"td",29),e.BQk(),e.YNc(33,yu,1,3,"tr",30),e.YNc(34,Zu,1,0,"tr",31),e.YNc(35,Au,1,0,"tr",32),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.forwardingHistoryEvents),e.xp6(31),e.Q6J("matFooterRowDef",e.DdM(6,Lu)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function bu(n,a){if(1&n&&e._UZ(0,"mat-paginator",49),2&n){const t=e.oxw();e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let De=(()=>{class n{constructor(t,i,o,l){this.logger=t,this.commonService=i,this.store=o,this.datePipe=l,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["in_msatoshi","out_msatoshi","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.successfulEvents=t.forwardingHistory||[],this.successfulEvents.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:s.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,t.eventsData.firstChange||this.loadForwardingEventsTable(this.successfulEvents)),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,i){this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:s.Gi.STRING}],[{key:"status",value:"Settled",title:"Status",width:50,type:s.Gi.STRING},{key:"fee",value:t.fee,title:"Fee (mSats)",width:50,type:s.Gi.NUMBER}],[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:s.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:s.Gi.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:s.Gi.STRING},{key:"out_channel",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:s.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:s.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Out (mSats)",width:50,type:s.Gi.NUMBER}]]}}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new r.by([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.forwardingHistoryEvents.paginator=this.paginator,this.forwardingHistoryEvents.filterPredicate=(i,o)=>((i.received_time?this.datePipe.transform(new Date(1e3*i.received_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.resolved_time?this.datePipe.transform(new Date(1e3*i.resolved_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.in_channel?i.in_channel.toLowerCase():"")+(i.out_channel?i.out_channel.toLowerCase():"")+(i.in_msatoshi?i.in_msatoshi/1e3:"")+(i.out_msatoshi?i.out_msatoshi/1e3:"")+(i.fee?i.fee:"")).includes(o),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(u.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-forwarding-history"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Events")}]),e.TTD],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"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"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["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"],["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,"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",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Xc,2,1,"div",1),e.YNc(2,Wc,4,1,"div",2),e.YNc(3,vu,36,7,"div",3),e.YNc(4,bu,1,3,"mat-paginator",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,r.BZ,y.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,P.pW,r.ge,y.nU,r.ev,R.gD,R.$L,B.ey,U.lW,r.yh,r.Q2,u.mk,q.oO,r.XQ,r.Gk,S.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function Su(n,a){if(1&n&&(e.TgZ(0,"div",5),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function wu(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e._UZ(1,"div",7),e.TgZ(2,"mat-form-field",8),e.TgZ(3,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.selFilter)}}function qu(n,a){1&n&&e._UZ(0,"mat-progress-bar",29)}function Fu(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1,"Status"),e.qZA())}function Ou(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,"local_failed"===(null==t?null:t.status)?"local failed":null==t?null:t.status))}}function Ru(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1,"Received Time"),e.qZA())}function Uu(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/YYYY HH:mm"))}}function Nu(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1,"In Channel"),e.qZA())}function ku(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(null==t?null:t.in_channel_alias)}}function Iu(n,a){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Amount In (Sats)"),e.qZA())}function Mu(n,a){if(1&n&&(e.TgZ(0,"td",31),e.TgZ(1,"span",33),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Eu(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",34),e.TgZ(1,"div",35),e.TgZ(2,"mat-select",36),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",37),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Du(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",38),e.TgZ(1,"button",39),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw(2).onFailedEventClick(l)}),e._uU(2,"View Info"),e.qZA(),e.qZA()}}function Pu(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No failed transaction available."),e.qZA())}function Ju(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting failed transactions..."),e.qZA())}function Qu(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function Yu(n,a){if(1&n&&(e.TgZ(0,"td",40),e.YNc(1,Pu,2,0,"p",41),e.YNc(2,Ju,2,0,"p",41),e.YNc(3,Qu,2,1,"p",41),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Bu=function(n){return{"display-none":n}};function Hu(n,a){if(1&n&&e._UZ(0,"tr",42),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Bu,(null==t.failedForwardingEvents?null:t.failedForwardingEvents.data)&&(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)>0))}}function Vu(n,a){1&n&&e._UZ(0,"tr",43)}function zu(n,a){1&n&&e._UZ(0,"tr",44)}const Gu=function(){return["no_event"]};function Xu(n,a){if(1&n&&(e.TgZ(0,"div",10),e.YNc(1,qu,1,0,"mat-progress-bar",11),e.TgZ(2,"table",12,13),e.ynx(4,14),e.YNc(5,Fu,2,0,"th",15),e.YNc(6,Ou,3,3,"td",16),e.BQk(),e.ynx(7,17),e.YNc(8,Ru,2,0,"th",15),e.YNc(9,Uu,3,4,"td",16),e.BQk(),e.ynx(10,18),e.YNc(11,Nu,2,0,"th",15),e.YNc(12,ku,2,1,"td",16),e.BQk(),e.ynx(13,19),e.YNc(14,Iu,2,0,"th",20),e.YNc(15,Mu,4,4,"td",16),e.BQk(),e.ynx(16,21),e.YNc(17,Eu,6,0,"th",22),e.YNc(18,Du,3,0,"td",23),e.BQk(),e.ynx(19,24),e.YNc(20,Yu,4,3,"td",25),e.BQk(),e.YNc(21,Hu,1,3,"tr",26),e.YNc(22,Vu,1,0,"tr",27),e.YNc(23,zu,1,0,"tr",28),e.qZA(),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.failedForwardingEvents),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(6,Gu)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function Wu(n,a){if(1&n&&e._UZ(0,"mat-paginator",45),2&n){const t=e.oxw();e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Ku=(()=>{class n{constructor(t,i,o,l,d){this.logger=t,this.commonService=i,this.store=o,this.datePipe=l,this.router=d,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.selFilter="",this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS||this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["status","received_time","in_msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["status","received_time","in_channel","in_msatoshi","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,T.Ip)()),this.store.select(h.xQ).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.failedEvents=t.failedForwardingHistory||[],this.failedEvents.length>0&&this.sort&&this.paginator&&this.loadFailedEventsTable(this.failedEvents),this.logger.info(t)})}ngAfterViewInit(){this.failedEvents.length>0&&this.loadFailedEventsTable(this.failedEvents)}onFailedEventClick(t){const i=[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:s.Gi.STRING}],[{key:"status",value:"local_failed"===t.status?"Local Failed":this.commonService.titleCase(t.status),title:"Status",width:50,type:s.Gi.STRING},{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:s.Gi.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:s.Gi.STRING},{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:s.Gi.NUMBER}]];this.store.dispatch((0,L.qR)({payload:{data:{type:s.n_.INFORMATION,alertTitle:"Event Information",message:i}}}))}loadFailedEventsTable(t){this.failedForwardingEvents=new r.by([...t]),this.failedForwardingEvents.sort=this.sort,this.failedForwardingEvents.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.failedForwardingEvents.paginator=this.paginator,this.failedForwardingEvents.filterPredicate=(i,o)=>((i.status?"local_failed"===i.status?"local failed":i.status.toLowerCase():"")+(i.received_time?this.datePipe.transform(new Date(1e3*i.received_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.resolved_time?this.datePipe.transform(new Date(1e3*i.resolved_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(i.in_channel?i.in_channel.toLowerCase():"")+(i.out_channel?i.out_channel.toLowerCase():"")+(i.in_msatoshi?i.in_msatoshi/1e3:"")+(i.out_msatoshi?i.out_msatoshi/1e3:"")+(i.fee?i.fee:"")).includes(o),this.applyFilter(),this.logger.info(this.failedForwardingEvents)}onDownloadCSV(){this.failedForwardingEvents&&this.failedForwardingEvents.data&&this.failedForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedForwardingEvents.data,"Failed-transactions")}applyFilter(){this.failedForwardingEvents.filter=this.selFilter.trim().toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh),e.Y36(u.uU),e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-failed-history"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Events")}])],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","in_channel"],["matColumnDef","in_msatoshi"],["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_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"],["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,"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",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Su,2,1,"div",1),e.YNc(2,wu,4,1,"div",2),e.YNc(3,Xu,24,7,"div",3),e.YNc(4,Wu,1,3,"mat-paginator",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,r.BZ,y.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,P.pW,r.ge,y.nU,r.ev,R.gD,R.$L,B.ey,U.lW,r.yh,r.Q2,u.mk,q.oO,r.XQ,r.Gk,S.NW],pipes:[u.rS,u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const $u=["tableIn"],ju=["tableOut"],ep=["paginatorIn"],tp=["paginatorOut"];function np(n,a){if(1&n&&(e.TgZ(0,"div",3),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function ip(n,a){1&n&&e._UZ(0,"mat-progress-bar",36)}function ap(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Channel ID"),e.qZA())}const ce=function(n){return{"max-width":n}};function op(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.channel_id)}}function sp(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Peer Alias"),e.qZA())}function lp(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.alias)}}function rp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Events"),e.qZA())}function cp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function up(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Amount (Sats)"),e.qZA())}function pp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function mp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Fee (Sats)"),e.qZA())}function dp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function fp(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No incoming routing peer available."),e.qZA())}function _p(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting incoming routing peers..."),e.qZA())}function hp(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function gp(n,a){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,fp,2,0,"p",43),e.YNc(2,_p,2,0,"p",43),e.YNc(3,hp,2,1,"p",43),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Pe=function(n){return{"display-none":n}};function Cp(n,a){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Pe,(null==t.RoutingPeersIncoming?null:t.RoutingPeersIncoming.data)&&(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function xp(n,a){1&n&&e._UZ(0,"tr",45)}function Tp(n,a){1&n&&e._UZ(0,"tr",46)}function yp(n,a){1&n&&e._UZ(0,"mat-progress-bar",36)}function Zp(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Channel ID"),e.qZA())}function Ap(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.channel_id)}}function Lp(n,a){1&n&&(e.TgZ(0,"th",37),e._uU(1,"Peer Alias"),e.qZA())}function vp(n,a){if(1&n&&(e.TgZ(0,"td",38),e._uU(1),e.qZA()),2&n){const t=a.$implicit,i=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,ce,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),e.xp6(1),e.Oqu(t.alias)}}function bp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Events"),e.qZA())}function Sp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function wp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Amount (Sats)"),e.qZA())}function qp(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function Fp(n,a){1&n&&(e.TgZ(0,"th",39),e._uU(1,"Fee (Sats)"),e.qZA())}function Op(n,a){if(1&n&&(e.TgZ(0,"td",40),e.TgZ(1,"span",41),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function Rp(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No outgoing routing peer available."),e.qZA())}function Up(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting outgoing routing peers..."),e.qZA())}function Np(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function kp(n,a){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,Rp,2,0,"p",43),e.YNc(2,Up,2,0,"p",43),e.YNc(3,Np,2,1,"p",43),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function Ip(n,a){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Pe,(null==t.RoutingPeersOutgoing?null:t.RoutingPeersOutgoing.data)&&(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function Mp(n,a){1&n&&e._UZ(0,"tr",45)}function Ep(n,a){1&n&&e._UZ(0,"tr",46)}const Dp=function(n,a){return{"mt-2":n,"mt-1":a}},Pp=function(){return["no_incoming_event"]},Jp=function(n){return{"mt-2":n}},Qp=function(){return["no_outgoing_event"]};function Yp(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",4),e.TgZ(1,"div",5),e.TgZ(2,"div",6),e.TgZ(3,"div",7),e._uU(4,"Incoming"),e.qZA(),e.TgZ(5,"mat-form-field",8),e.TgZ(6,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyIncomingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterIn=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"div",10),e.YNc(8,ip,1,0,"mat-progress-bar",11),e.TgZ(9,"table",12,13),e.ynx(11,14),e.YNc(12,ap,2,0,"th",15),e.YNc(13,op,2,4,"td",16),e.BQk(),e.ynx(14,17),e.YNc(15,sp,2,0,"th",15),e.YNc(16,lp,2,4,"td",16),e.BQk(),e.ynx(17,18),e.YNc(18,rp,2,0,"th",19),e.YNc(19,cp,4,3,"td",20),e.BQk(),e.ynx(20,21),e.YNc(21,up,2,0,"th",19),e.YNc(22,pp,4,4,"td",20),e.BQk(),e.ynx(23,22),e.YNc(24,mp,2,0,"th",19),e.YNc(25,dp,4,4,"td",20),e.BQk(),e.ynx(26,23),e.YNc(27,gp,4,3,"td",24),e.BQk(),e.YNc(28,Cp,1,3,"tr",25),e.YNc(29,xp,1,0,"tr",26),e.YNc(30,Tp,1,0,"tr",27),e.qZA(),e.qZA(),e._UZ(31,"mat-paginator",28,29),e.qZA(),e.TgZ(33,"div",30),e.TgZ(34,"div",6),e.TgZ(35,"div",7),e._uU(36,"Outgoing"),e.qZA(),e.TgZ(37,"mat-form-field",8),e.TgZ(38,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterOut=o}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(39,"div",31),e.YNc(40,yp,1,0,"mat-progress-bar",11),e.TgZ(41,"table",32,33),e.ynx(43,14),e.YNc(44,Zp,2,0,"th",15),e.YNc(45,Ap,2,4,"td",16),e.BQk(),e.ynx(46,17),e.YNc(47,Lp,2,0,"th",15),e.YNc(48,vp,2,4,"td",16),e.BQk(),e.ynx(49,18),e.YNc(50,bp,2,0,"th",19),e.YNc(51,Sp,4,3,"td",20),e.BQk(),e.ynx(52,21),e.YNc(53,wp,2,0,"th",19),e.YNc(54,qp,4,4,"td",20),e.BQk(),e.ynx(55,22),e.YNc(56,Fp,2,0,"th",19),e.YNc(57,Op,4,4,"td",20),e.BQk(),e.ynx(58,34),e.YNc(59,kp,4,3,"td",24),e.BQk(),e.YNc(60,Ip,1,3,"tr",25),e.YNc(61,Mp,1,0,"tr",26),e.YNc(62,Ep,1,0,"tr",27),e.qZA(),e._UZ(63,"mat-paginator",28,35),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngClass",e.WLB(22,Dp,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),e.xp6(4),e.Q6J("ngModel",t.filterIn),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersIncoming),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(25,Pp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),e.xp6(3),e.Q6J("ngClass",e.VKq(26,Jp,t.screenSize!==t.screenSizeEnum.LG)),e.xp6(4),e.Q6J("ngModel",t.filterOut),e.xp6(2),e.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersOutgoing),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(28,Qp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Bp=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.RoutingPeersIncoming=[],this.RoutingPeersOutgoing=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","total_fee"]):this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_fee"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_amount","total_fee"]):(this.flgSticky=!0,this.displayedColumns=["channel_id","alias","events","total_amount","total_fee"])}ngOnInit(){this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.successfulEvents=t.forwardingHistory||[],this.successfulEvents.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadRoutingPeersTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:s.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,t.eventsData.firstChange||this.loadRoutingPeersTable(this.successfulEvents))}loadRoutingPeersTable(t){if(t.length>0){const i=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new r.by(i[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,l)=>JSON.stringify(o).toLowerCase().includes(l),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(i[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,l)=>JSON.stringify(o).toLowerCase().includes(l),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter(),this.logger.info(this.RoutingPeersIncoming),this.logger.info(this.RoutingPeersOutgoing)}groupRoutingPeers(t){const i=[],o=[];return t.forEach(l=>{const d=i.find(J=>J.channel_id===l.in_channel),v=o.find(J=>J.channel_id===l.out_channel);d?(d.events++,d.total_amount=+d.total_amount+ +l.in_msatoshi,d.total_fee=l.in_msatoshi-l.out_msatoshi+ +d.total_fee):i.push({channel_id:l.in_channel,alias:l.in_channel_alias,events:1,total_amount:l.in_msatoshi,total_fee:l.in_msatoshi-l.out_msatoshi}),v?(v.events++,v.total_amount=+v.total_amount+ +l.out_msatoshi,v.total_fee=l.in_msatoshi-l.out_msatoshi+ +v.total_fee):o.push({channel_id:l.out_channel,alias:l.out_channel_alias,events:1,total_amount:l.out_msatoshi,total_fee:l.in_msatoshi-l.out_msatoshi})}),[this.commonService.sortDescByKey(i,"total_fee"),this.commonService.sortDescByKey(o,"total_fee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-routing-peers"]],viewQuery:function(t,i){if(1&t&&(e.Gf($u,5,y.YE),e.Gf(ju,5,y.YE),e.Gf(ep,5),e.Gf(tp,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sortIn=o.first),e.iGM(o=e.CRH())&&(i.sortOut=o.first),e.iGM(o=e.CRH())&&(i.paginatorIn=o.first),e.iGM(o=e.CRH())&&(i.paginatorOut=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Peers")}]),e.TTD],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","page-sub-title-container",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"page-sub-title-container"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto","incoming-table",3,"dataSource"],["tableIn",""],["matColumnDef","channel_id"],["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","total_amount"],["matColumnDef","total_fee"],["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"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["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,i){1&t&&(e.TgZ(0,"div",0),e.YNc(1,np,2,1,"div",1),e.YNc(2,Yp,65,29,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==i.errorMessage),e.xp6(1),e.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,u.mk,q.oO,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,r.BZ,y.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Hp(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",7),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let Vp=(()=>{class n{constructor(t){this.router=t,this.faChartBar=x.koM,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Reports"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e.TgZ(7,"nav",5),e.YNc(8,Hp,2,3,"div",6),e.qZA(),e._UZ(9,"router-outlet"),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faChartBar),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,k.BU,u.sg,C.lC,k.Nj,C.rH],styles:[""]}),n})();var Je=_(4821),Qe=_(6831),Ye=_(3035);function zp(n,a){1&n&&(e.TgZ(0,"div",9),e._UZ(1,"mat-progress-bar",10),e.TgZ(2,"p"),e._uU(3,"Getting fee report..."),e.qZA(),e.qZA())}function Gp(n,a){if(1&n&&(e.TgZ(0,"div",11),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function Xp(n,a){if(1&n&&(e.TgZ(0,"div",12),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.totalFeeMsat),e.xp6(1),e.AsE("",e.xi3(2,3,t.totalFeeMsat/1e3||0,"1.0-2")," Sats/",e.lcZ(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function Wp(n,a){1&n&&(e.TgZ(0,"div",9),e._uU(1,"No fee report for the selected period"),e.qZA())}function Kp(n,a){if(1&n&&(e.TgZ(0,"span"),e.TgZ(1,"span",15),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"span",15),e._uU(5),e.ALo(6,"number"),e.qZA(),e.qZA()),2&n){const t=a.model;e.xp6(2),e.hij("Events: ",e.lcZ(3,2,t.extra.totalEvents||0),""),e.xp6(3),e.hij("Fee: ",e.xi3(6,4,t.value||0,"1.0-2"),"")}}function $p(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical",13),e.NdJ("select",function(o){return e.CHM(t),e.oxw().onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw().onChartMouseUp(o)}),e.YNc(1,Kp,7,7,"ng-template",null,14,e.W1O),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("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 jp(n,a){if(1&n&&e._UZ(0,"rtl-cl-forwarding-history",16),2&n){const t=e.oxw();e.Q6J("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let em=(()=>{class n{constructor(t,i,o){this.logger=t,this.commonService=i,this.store=o,this.reportPeriod=s.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.totalFeeMsat=null,this.today=new Date(Date.now()),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=s.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===s.cu.XS||this.screenSize===s.cu.SM),this.store.select(h.Bo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.events=t.forwardingHistory||[],this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(t)}),this.commonService.containerSizeUpdated.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case s.cu.MD:this.screenPaddingX=t.width/10;break;case s.cu.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,i){const o=Math.round(t.getTime()/1e3),l=Math.round(i.getTime()/1e3);this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeMsat=null,this.events&&this.events.length>0&&(this.events.forEach(d=>{d.received_time>=o&&d.received_time0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===s.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+s.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const i=Math.round(t.getTime()/1e3),o=[];if(this.reportPeriod===s.op[1]){for(let l=0;l<12;l++)o.push({name:s.gg[l].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(l=>{const d=new Date(1e3*+l.received_time).getMonth();return o[d].value=o[d].value+ +l.fee/1e3,o[d].extra.totalEvents=o[d].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +l.fee,this.filteredEventsBySelectedPeriod})}else{for(let l=0;l{const d=Math.floor((+l.received_time-i)/this.secondsInADay);return o[d].value=o[d].value+ +l.fee/1e3,o[d].extra.totalEvents=o[d].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +l.fee,this.filteredEventsBySelectedPeriod})}return o}onSelectionChange(t){const i=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===s.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,i){return 1===t&&i%4==0?s.gg[t].days+1:s.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-fee-report"]],hostBindings:function(t,i){1&t&&e.NdJ("mouseup",function(l){return i.onChartMouseUp(l)})},decls:11,vars:6,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 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1 error-border",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",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","mt-1"],["mode","indeterminate"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1","error-border"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"rtl-horizontal-scroller",1),e.NdJ("stepChanged",function(l){return i.onSelectionChange(l)}),e.qZA(),e.TgZ(2,"div",2),e.YNc(3,zp,4,0,"div",3),e.YNc(4,Gp,2,1,"div",4),e.YNc(5,Xp,4,8,"div",5),e.YNc(6,Wp,2,0,"div",3),e.TgZ(7,"div",6),e.YNc(8,$p,3,11,"ngx-charts-bar-vertical",7),e.qZA(),e.TgZ(9,"div",6),e.YNc(10,jp,1,2,"rtl-cl-forwarding-history",8),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.ERROR),e.xp6(1),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.COMPLETED&&i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),e.xp6(1),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.COMPLETED&&(i.feeReportData.length<=0||i.filteredEventsBySelectedPeriod.length<=0)),e.xp6(2),e.Q6J("ngIf",i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),e.xp6(2),e.Q6J("ngIf",i.filteredEventsBySelectedPeriod&&i.filteredEventsBySelectedPeriod.length>0))},directives:[p.xw,p.Wh,p.yH,Qe.D,u.O5,P.pW,Ye.K$,De],pipes:[u.JJ],styles:[""],data:{animation:[Je.J]}}),n})();var tm=_(6785);function nm(n,a){if(1&n&&(e.TgZ(0,"div",10),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Paid ",e.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function im(n,a){if(1&n&&(e.TgZ(0,"div",10),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Received ",e.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function am(n,a){if(1&n&&(e.TgZ(0,"div",8),e.YNc(1,nm,4,7,"div",9),e.YNc(2,im,4,7,"div",9),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.transactionsReportSummary),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function om(n,a){1&n&&(e.TgZ(0,"div",11),e._uU(1,"No transactions report for the selected period"),e.qZA())}function sm(n,a){if(1&n&&(e.TgZ(0,"span",14),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=a.model;e.xp6(1),e.HOy("",t.name,": ",e.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",e.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function lm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical-2d",12),e.NdJ("select",function(o){return e.CHM(t),e.oxw().onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw().onChartMouseUp(o)}),e.YNc(1,sm,4,9,"ng-template",null,13,e.W1O),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("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:4)}}function rm(n,a){if(1&n&&e._UZ(0,"rtl-transactions-report-table",15),2&n){const t=e.oxw();e.Q6J("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let cm=(()=>{class n{constructor(t,i){this.commonService=t,this.store=i,this.scrollRanges=s.op,this.reportPeriod=s.op[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.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=s.cu,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===s.cu.XS||this.screenSize===s.cu.SM),this.store.select(h.PP).pipe((0,f.R)(this.unSubs[0]),(0,ie.M)(this.store.select(h.gc))).subscribe(([t,i])=>{this.payments=t.payments,this.invoices=i.listInvoices.invoices,this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()}),this.commonService.containerSizeUpdated.pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case s.cu.MD:this.screenPaddingX=t.width/10;break;case s.cu.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===s.op[1]?t.series+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+s.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,i){const o=Math.round(t.getTime()/1e3),l=Math.round(i.getTime()/1e3),d=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const v=this.payments.filter(A=>"complete"===A.status&&A.created_at>=o&&A.created_at"paid"===A.status&&A.paid_at>=o&&A.paid_at{const E=new Date(1e3*A.created_at).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+A.msatoshi_sent,d[E].series[0].value=d[E].series[0].value+A.msatoshi_sent/1e3,d[E].series[0].extra.total=d[E].series[0].extra.total+1,this.transactionsReportSummary}),J.map(A=>{const E=new Date(1e3*+A.paid_at).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+A.msatoshi_received,d[E].series[1].value=d[E].series[1].value+A.msatoshi_received/1e3,d[E].series[1].extra.total=d[E].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let A=0;A{const E=Math.floor((+A.created_at-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+A.msatoshi_sent,d[E].series[0].value=d[E].series[0].value+A.msatoshi_sent/1e3,d[E].series[0].extra.total=d[E].series[0].extra.total+1,this.transactionsReportSummary}),J.map(A=>{const E=Math.floor((+A.paid_at-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+A.msatoshi_received,d[E].series[1].value=d[E].series[1].value+A.msatoshi_received/1e3,d[E].series[1].extra.total=d[E].series[1].extra.total+1,this.transactionsReportSummary})}return d}prepareTableData(){return this.transactionsReportData.reduce((t,i)=>i.series[0].extra.total>0||i.series[1].extra.total>0?t.concat({date:i.date,amount_paid:i.series[0].value,num_payments:i.series[0].extra.total,amount_received:i.series[1].value,num_invoices:i.series[1].extra.total}):t,[])}onSelectionChange(t){const i=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===s.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,i){return 1===t&&i%4==0?s.gg[t].days+1:s.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v),e.Y36(b.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-transactions-report"]],hostBindings:function(t,i){1&t&&e.NdJ("mouseup",function(l){return i.onChartMouseUp(l)})},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"],["class","two-color",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"],[1,"two-color",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,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"rtl-horizontal-scroller",1),e.NdJ("stepChanged",function(l){return i.onSelectionChange(l)}),e.qZA(),e.TgZ(2,"div",2),e.YNc(3,am,3,3,"div",3),e.YNc(4,om,2,0,"div",4),e.TgZ(5,"div",5),e.YNc(6,lm,3,13,"ngx-charts-bar-vertical-2d",6),e.qZA(),e.TgZ(7,"div",5),e.YNc(8,rm,1,3,"rtl-transactions-report-table",7),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(3),e.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),e.xp6(1),e.Q6J("ngIf",i.transactionsNonZeroReportData.length<=0),e.xp6(2),e.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),e.xp6(2),e.Q6J("ngIf",i.transactionsNonZeroReportData.length>0))},directives:[p.xw,p.Wh,p.yH,Qe.D,u.O5,Ye.H5,tm.g],pipes:[u.JJ],styles:[""],data:{animation:[Je.J]}}),n})();var w=_(3894),um=_(5704);function pm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().activeLink=l.link}),e._uU(1),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",i.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let mm=(()=>{class n{constructor(t){this.router=t,this.faSearch=x.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,f.R)(this.unSubs[0]),(0,D.h)(i=>i instanceof C.Av)).subscribe(i=>{const o=this.links.find(l=>i.urlAfterRedirects.includes(l.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(C.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-graph"]],decls:11,vars:2,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"],["fxLayout","column"],["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,i){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Graph Lookups"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"mat-card"),e.TgZ(6,"mat-card-content",4),e.TgZ(7,"nav",5),e.YNc(8,pm,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(1),e.Q6J("icon",i.faSearch),e.xp6(7),e.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,N.BN,Z.a8,Z.dn,k.BU,u.sg,p.yH,C.lC,k.Nj,C.rH],styles:[""]}),n})();function dm(n,a){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.offerError)}}function fm(n,a){if(1&n&&(e.TgZ(0,"div",21),e._UZ(1,"fa-icon",22),e.YNc(2,dm,2,1,"span",23),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.offerError)}}let _m=(()=>{class n{constructor(t,i,o,l,d,v){this.dialogRef=t,this.data=i,this.store=o,this.decimalPipe=l,this.commonService=d,this.actions=v,this.faExclamationTriangle=x.eHv,this.selNode={},this.description="",this.vendor="",this.offerValueHint="",this.information={},this.pageSize=s.IV,this.offerError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t,this.vendor=this.information.alias}),this.actions.pipe((0,f.R)(this.unSubs[2]),(0,D.h)(t=>t.type===s.sW.UPDATE_API_CALL_STATUS_CL)).subscribe(t=>{t.type===s.sW.UPDATE_API_CALL_STATUS_CL&&"SaveNewOffer"===t.payload.action&&(t.payload.status===s.Bn.ERROR&&(this.offerError=t.payload.message),t.payload.status===s.Bn.COMPLETED&&this.dialogRef.close())})}onAddOffer(){this.offerError="",this.store.dispatch((0,T.dh)({payload:{amount:this.offerValue?this.offerValue+"sats":"any",description:this.description,vendor:this.vendor}}))}resetData(){this.description="",this.vendor=this.information.alias,this.offerValue=null,this.offerValueHint="",this.offerError=""}onOfferValueChange(){this.selNode.fiatConversion&&this.offerValue>99&&(this.offerValueHint="",this.commonService.convertCurrency(this.offerValue,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,f.R)(this.unSubs[3])).subscribe({next:t=>{this.offerValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,s.Xz.OTHER)+" "+t.unit},error:t=>{this.offerValueHint="Conversion Error: "+t}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(M.so),e.Y36(M.WI),e.Y36(b.yh),e.Y36(u.JJ),e.Y36(O.v),e.Y36(H.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-create-offer"]],decls:28,vars:8,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addOfferForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","1","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","offerValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","58","fxLayoutAlign","start end"],["matInput","","placeholder","Vendor","tabindex","3","name","vendor",3,"ngModel","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","4","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","5",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"mat-card-header",2),e.TgZ(3,"div",3),e.TgZ(4,"span",4),e._uU(5,"Create Offer"),e.qZA(),e.qZA(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA(),e.qZA(),e.TgZ(8,"mat-card-content",6),e.TgZ(9,"form",7,8),e.TgZ(11,"mat-form-field",9),e.TgZ(12,"input",10),e.NdJ("ngModelChange",function(l){return i.description=l}),e.qZA(),e.qZA(),e.TgZ(13,"div",11),e.TgZ(14,"mat-form-field",12),e.TgZ(15,"input",13),e.NdJ("ngModelChange",function(l){return i.offerValue=l})("keyup",function(){return i.onOfferValueChange()}),e.qZA(),e.TgZ(16,"span",14),e._uU(17," Sats "),e.qZA(),e.TgZ(18,"mat-hint"),e._uU(19),e.qZA(),e.qZA(),e.TgZ(20,"mat-form-field",15),e.TgZ(21,"input",16),e.NdJ("ngModelChange",function(l){return i.vendor=l}),e.qZA(),e.qZA(),e.qZA(),e.YNc(22,fm,3,2,"div",17),e.TgZ(23,"div",18),e.TgZ(24,"button",19),e.NdJ("click",function(){return i.resetData()}),e._uU(25,"Clear Field"),e.qZA(),e.TgZ(26,"button",20),e.NdJ("click",function(){return i.onAddOffer()}),e._uU(27,"Create Offer"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.qZA()),2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",i.description),e.xp6(3),e.Q6J("ngModel",i.offerValue)("step",100)("min",1),e.xp6(4),e.Oqu(i.offerValueHint),e.xp6(2),e.Q6J("ngModel",i.vendor),e.xp6(1),e.Q6J("ngIf",""!==i.offerError))},directives:[p.xw,p.yH,Z.dk,p.Wh,U.lW,M.ZT,Z.dn,c._Y,c.JL,c.F,g.KE,I.Nt,c.Fj,V.h,c.JJ,c.On,c.wV,c.qQ,X.q,g.R9,g.bx,u.O5,N.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var Be=_(3178);function hm(n,a){1&n&&e._UZ(0,"mat-progress-bar",28)}function gm(n,a){1&n&&(e.TgZ(0,"th",29),e._uU(1," Offer ID "),e.qZA())}const He=function(n){return{"mr-0":n}};function Cm(n,a){if(1&n&&e._UZ(0,"span",35),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,He,t.screenSize===t.screenSizeEnum.XS))}}function xm(n,a){if(1&n&&e._UZ(0,"span",36),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,He,t.screenSize===t.screenSizeEnum.XS))}}const Tm=function(n){return{"max-width":n}};function ym(n,a){if(1&n&&(e.TgZ(0,"td",30),e.TgZ(1,"div",31),e.TgZ(2,"span",32),e.YNc(3,Cm,1,3,"span",33),e.YNc(4,xm,1,3,"span",34),e._uU(5),e.qZA(),e.qZA(),e.qZA()),2&n){const t=a.$implicit,i=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(4,Tm,i.screenSize===i.screenSizeEnum.XS?"30rem":"")),e.xp6(2),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active),e.xp6(1),e.hij(" ",t.offer_id," ")}}function Zm(n,a){1&n&&(e.TgZ(0,"th",29),e._uU(1," Single Use "),e.qZA())}function Am(n,a){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t.single_use?"Yes":"No")}}function Lm(n,a){1&n&&(e.TgZ(0,"th",29),e._uU(1," Used "),e.qZA())}function vm(n,a){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.hij(" ",t.used?"Yes":"No"," ")}}function bm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",37),e.TgZ(1,"div",38),e.TgZ(2,"mat-select",39),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}function Sm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onDisableOffer(o)}),e._uU(1,"Disable Offer"),e.qZA()}}function wm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onPrintOffer(o)}),e._uU(1,"Export QR code"),e.qZA()}}const qm=function(n){return{"px-3":n}};function Fm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",41),e.TgZ(1,"div",42),e.TgZ(2,"mat-select",43),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",40),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onOfferClick(l)}),e._uU(5,"View Info"),e.qZA(),e.YNc(6,Sm,2,0,"mat-option",44),e.YNc(7,wm,2,0,"mat-option",44),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=a.$implicit,i=e.oxw();e.Q6J("ngClass",e.VKq(3,qm,i.screenSize!==i.screenSizeEnum.XS)),e.xp6(6),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",t.active)}}function Om(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No offer available."),e.qZA())}function Rm(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting offers..."),e.qZA())}function Um(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Nm(n,a){if(1&n&&(e.TgZ(0,"td",45),e.YNc(1,Om,2,0,"p",46),e.YNc(2,Rm,2,0,"p",46),e.YNc(3,Um,2,1,"p",46),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const km=function(n){return{"display-none":n}};function Im(n,a){if(1&n&&e._UZ(0,"tr",47),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,km,(null==t.offers?null:t.offers.data)&&(null==t.offers||null==t.offers.data?null:t.offers.data.length)>0))}}function Mm(n,a){1&n&&e._UZ(0,"tr",48)}function Em(n,a){1&n&&e._UZ(0,"tr",49)}const Dm=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Pm=function(){return["no_offer"]};function Qm(n,a){1&n&&e._UZ(0,"mat-progress-bar",29)}function Ym(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1," Updated At "),e.qZA())}function Bm(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,t.updatedAt,"dd/MMM/YYYY HH:mm"))}}function Hm(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1," Title "),e.qZA())}function Vm(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t.title)}}function zm(n,a){1&n&&(e.TgZ(0,"th",32),e._uU(1," Amount (Sats) "),e.qZA())}function Gm(n,a){if(1&n&&(e.TgZ(0,"td",33),e.TgZ(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA(),e.qZA()),2&n){const t=a.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amountmSat/1e3))}}function Xm(n,a){1&n&&(e.TgZ(0,"th",30),e._uU(1," Description "),e.qZA())}function Wm(n,a){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=a.$implicit;e.xp6(1),e.Oqu(t.description)}}function Km(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"th",35),e.TgZ(1,"div",36),e.TgZ(2,"mat-select",37),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",38),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}}const $m=function(n){return{"px-3":n}};function jm(n,a){if(1&n){const t=e.EpF();e.TgZ(0,"td",39),e.TgZ(1,"div",40),e.TgZ(2,"mat-select",41),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",38),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onPaidOfferClick(l)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",38),e.NdJ("click",function(){const l=e.CHM(t).$implicit;return e.oxw().onRePayOffer(l)}),e._uU(7,"Pay Again"),e.qZA(),e.qZA(),e.qZA(),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,$m,t.screenSize!==t.screenSizeEnum.XS))}}function ed(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"No paid offer saved."),e.qZA())}function td(n,a){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting paid offers..."),e.qZA())}function nd(n,a){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function id(n,a){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,ed,2,0,"p",43),e.YNc(2,td,2,0,"p",43),e.YNc(3,nd,2,1,"p",43),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.paidOffers&&t.paidOffers.data)||(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.paidOffers&&t.paidOffers.data)||(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.paidOffers&&t.paidOffers.data)||(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const ad=function(n){return{"display-none":n}};function od(n,a){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,ad,(null==t.paidOffers?null:t.paidOffers.data)&&(null==t.paidOffers||null==t.paidOffers.data?null:t.paidOffers.data.length)>0))}}function sd(n,a){1&n&&e._UZ(0,"tr",45)}function ld(n,a){1&n&&e._UZ(0,"tr",46)}const rd=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},cd=function(){return["no_offer"]},md=C.Bz.forChild([{path:"",component:ge,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Ki,canActivate:[w.lB]},{path:"onchain",component:uo,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:bs,canActivate:[w.lB]},{path:"send/:selTab",component:Oe,data:{sweepAll:!1},canActivate:[w.lB]},{path:"sweep/:selTab",component:Oe,data:{sweepAll:!0},canActivate:[w.lB]}]},{path:"connections",component:fo,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:Ws,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:Pl,canActivate:[w.lB]},{path:"pending",component:br,canActivate:[w.lB]}]},{path:"peers",component:fc,data:{sweepAll:!1},canActivate:[w.lB]}]},{path:"transactions",component:ho,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:ve,canActivate:[w.lB]},{path:"invoices",component:Ae,canActivate:[w.lB]},{path:"offers",component:(()=>{class n{constructor(t,i,o,l){this.logger=t,this.store=i,this.commonService=o,this.rtlEffects=l,this.faHistory=x.qO$,this.selNode={},this.newlyAddedOfferMemo="",this.newlyAddedOfferValue=0,this.description="",this.offerValue=null,this.offerValueHint="",this.displayedColumns=[],this.offerPaymentReq="",this.offerJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","actions"]):this.screenSize===s.cu.SM||this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","used","actions"]):(this.flgSticky=!0,this.displayedColumns=["offer_id","single_use","used","actions"])}ngOnInit(){this.store.select(h.Jo).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(h.W3).pipe((0,f.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(h.Y_).pipe((0,f.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.offerJSONArr=t.offers||[],this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr)}openCreateOfferModal(){this.store.dispatch((0,L.qR)({payload:{data:{pageSize:this.pageSize,component:_m}}}))}onOfferClick(t){this.store.dispatch((0,L.qR)({payload:{data:{offer:{used:t.used,single_use:t.single_use,active:t.active,offer_id:t.offer_id,bolt12:t.bolt12,bolt12_unsigned:t.bolt12_unsigned},newlyAdded:!1,component:Be.V}}}))}onDisableOffer(t){this.store.dispatch((0,L.c1)({payload:{data:{type:s.n_.CONFIRM,alertTitle:"Disable Offer",titleMessage:"Disabling Offer: "+(t.offer_id||t.bolt12),noBtnText:"Cancel",yesBtnText:"Disable"}}})),this.rtlEffects.closeConfirm.pipe((0,f.R)(this.unSubs[3])).subscribe(i=>{i&&this.store.dispatch((0,T.i9)({payload:{offer_id:t.offer_id}}))})}onPrintOffer(t){}applyFilter(){this.offers.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.offers=new r.by(t?[...t]:[]),this.offers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.offers.sort=this.sort,this.offers.filterPredicate=(i,o)=>(("active"===o||"inactive"===o||"used"===o||"unused"===o||"single"===o||"multiple"===o)&&(o=" "+o),((i.active?" active":" inactive")+(i.used?" used":" unused")+(i.single_use?" single":" multiple")+JSON.stringify(i).toLowerCase()).includes(o)),this.offers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offers.data&&this.offers.data.length>0&&this.commonService.downloadFile(this.offers.data,"Offers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v),e.Y36(W.V))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-offers-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Offers")}])],decls:34,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","offer_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","single_use"],["matColumnDef","used"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["class","dot green","matTooltip","Active","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Inactive","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Active","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Inactive","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["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"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return i.openCreateOfferModal()}),e._uU(3,"Create Offer"),e.qZA(),e.qZA(),e.TgZ(4,"div",3),e.TgZ(5,"div",4),e.TgZ(6,"div",5),e._UZ(7,"fa-icon",6),e.TgZ(8,"span",7),e._uU(9,"Offers History"),e.qZA(),e.qZA(),e.TgZ(10,"mat-form-field",8),e.TgZ(11,"input",9),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,hm,1,0,"mat-progress-bar",11),e.TgZ(14,"table",12,13),e.ynx(16,14),e.YNc(17,gm,2,0,"th",15),e.YNc(18,ym,6,6,"td",16),e.BQk(),e.ynx(19,17),e.YNc(20,Zm,2,0,"th",15),e.YNc(21,Am,2,1,"td",16),e.BQk(),e.ynx(22,18),e.YNc(23,Lm,2,0,"th",15),e.YNc(24,vm,2,1,"td",16),e.BQk(),e.ynx(25,19),e.YNc(26,bm,6,0,"th",20),e.YNc(27,Fm,8,5,"td",21),e.BQk(),e.ynx(28,22),e.YNc(29,Nm,4,3,"td",23),e.BQk(),e.YNc(30,Im,1,3,"tr",24),e.YNc(31,Mm,1,0,"tr",25),e.YNc(32,Em,1,0,"tr",26),e.qZA(),e.qZA(),e._UZ(33,"mat-paginator",27),e.qZA(),e.qZA()),2&t&&(e.xp6(7),e.Q6J("icon",i.faHistory),e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(2),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.offers)("ngClass",e.VKq(12,Dm,""!==i.errorMessage)),e.xp6(16),e.Q6J("matFooterRowDef",e.DdM(14,Pm)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,U.lW,N.BN,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,u.PC,q.Zl,Q.gM,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],styles:[".mat-column-offer_id[_ngcontent-%COMP%]{flex:0 0 65%;width:65%}.mat-column-offer_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})(),canActivate:[w.lB]},{path:"paidoffr",component:(()=>{class n{constructor(t,i,o){this.logger=t,this.store=i,this.commonService=o,this.faHistory=x.qO$,this.displayedColumns=[],this.paidOfferJSONArr=[],this.flgSticky=!1,this.pageSize=s.IV,this.pageSizeOptions=s.TJ,this.screenSize="",this.screenSizeEnum=s.cu,this.selFilter="",this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=s.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===s.cu.XS||this.screenSize===s.cu.SM?(this.flgSticky=!1,this.displayedColumns=["updatedAt","title","amountmSat","actions"]):this.screenSize===s.cu.MD?(this.flgSticky=!1,this.displayedColumns=["updatedAt","title","amountmSat","description","actions"]):(this.flgSticky=!0,this.displayedColumns=["updatedAt","title","amountmSat","description","actions"])}ngOnInit(){this.store.select(h._H).pipe((0,f.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===s.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paidOfferJSONArr=t.paidOffers||[],this.paidOfferJSONArr&&this.paidOfferJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.paidOfferJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paidOfferJSONArr&&this.paidOfferJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.paidOfferJSONArr)}onPaidOfferClick(t){this.store.dispatch((0,L.qR)({payload:{data:{offer:{bolt12:t.offerBolt12},newlyAdded:!1,component:Be.V}}}))}onRePayOffer(t){this.store.dispatch((0,L.qR)({payload:{data:{paymentType:s.IX.OFFER,offerBolt12:t.offerBolt12,offerTitle:t.title,offerUUId:t.id,component:Le}}}))}applyFilter(){this.paidOffers.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.paidOffers=new r.by(t?[...t]:[]),this.paidOffers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.paidOffers.sort=this.sort,this.paidOffers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.paidOffers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.paidOffers.data&&this.paidOffers.data.length>0&&this.commonService.downloadFile(this.paidOffers.data,"PaidSavedOffers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(F.mQ),e.Y36(b.yh),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-cl-paid-offers-table"]],viewQuery:function(t,i){if(1&t&&(e.Gf(y.YE,5),e.Gf(S.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(i.sort=o.first),e.iGM(o=e.CRH())&&(i.paginator=o.first)}},features:[e._Bn([{provide:S.ye,useValue:(0,s.pt)("Paid Offers")}])],decls:34,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","updatedAt"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","amountmSat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["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-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,i){1&t&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"div",2),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span",5),e._uU(6,"Paid & Saved Offers"),e.qZA(),e.qZA(),e.TgZ(7,"mat-form-field",6),e.TgZ(8,"input",7),e.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(l){return i.selFilter=l}),e.qZA(),e.qZA(),e.qZA(),e.TgZ(9,"div",8),e.YNc(10,Qm,1,0,"mat-progress-bar",9),e.TgZ(11,"table",10,11),e.ynx(13,12),e.YNc(14,Ym,2,0,"th",13),e.YNc(15,Bm,3,4,"td",14),e.BQk(),e.ynx(16,15),e.YNc(17,Hm,2,0,"th",13),e.YNc(18,Vm,2,1,"td",14),e.BQk(),e.ynx(19,16),e.YNc(20,zm,2,0,"th",17),e.YNc(21,Gm,4,3,"td",18),e.BQk(),e.ynx(22,19),e.YNc(23,Xm,2,0,"th",13),e.YNc(24,Wm,2,1,"td",14),e.BQk(),e.ynx(25,20),e.YNc(26,Km,6,0,"th",21),e.YNc(27,jm,8,3,"td",22),e.BQk(),e.ynx(28,23),e.YNc(29,id,4,3,"td",24),e.BQk(),e.YNc(30,od,1,3,"tr",25),e.YNc(31,sd,1,0,"tr",26),e.YNc(32,ld,1,0,"tr",27),e.qZA(),e.qZA(),e._UZ(33,"mat-paginator",28),e.qZA(),e.qZA()),2&t&&(e.xp6(4),e.Q6J("icon",i.faHistory),e.xp6(4),e.Q6J("ngModel",i.selFilter),e.xp6(2),e.Q6J("ngIf",(null==i.apiCallStatus?null:i.apiCallStatus.status)===i.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",i.paidOffers)("ngClass",e.VKq(12,rd,""!==i.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(14,cd)),e.xp6(1),e.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",i.displayedColumns),e.xp6(1),e.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,N.BN,g.KE,I.Nt,c.Fj,c.JJ,c.On,Y.$V,u.O5,r.BZ,y.YE,u.mk,q.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,S.NW,P.pW,r.ge,y.nU,r.ev,R.gD,R.$L,B.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],styles:[".mat-column-offer_id[_ngcontent-%COMP%]{flex:0 0 65%;width:65%}.mat-column-offer_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})(),canActivate:[w.lB]}]},{path:"messages",component:As,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:Pc,canActivate:[w.lB]},{path:"verify",component:Gc,canActivate:[w.lB]}]},{path:"routing",component:Co,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:De,canActivate:[w.lB]},{path:"failedtransactions",component:Ku,canActivate:[w.lB]},{path:"routingpeers",component:Bp,canActivate:[w.lB]}]},{path:"reports",component:Vp,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:em,canActivate:[w.lB]},{path:"transactions",component:cm,canActivate:[w.lB]}]},{path:"graph",component:mm,canActivate:[w.lB],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:Wo,canActivate:[w.lB]},{path:"queryroutes",component:Ec,canActivate:[w.lB]}]},{path:"rates",component:ys,canActivate:[w.lB]},{path:"**",component:um.w},{path:"network",redirectTo:"rates"},{path:"wallet",redirectTo:"home"},{path:"backup",redirectTo:"home"}]}]);var dd=_(3387);let fd=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n,bootstrap:[ge]}),n.\u0275inj=e.cJS({providers:[w.lB],imports:[[u.ez,dd.m,md]]}),n})()}}]); \ No newline at end of file diff --git a/angular/871.027975287965ae24.js b/angular/871.027975287965ae24.js deleted file mode 100644 index e6f21c1d..00000000 --- a/angular/871.027975287965ae24.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[871],{2871:(kc,lt,g)=>{g.r(lt),g.d(lt,{ECLModule:()=>Nc});var u=g(6019),y=g(7292),kt=g(7362),t=g(3668),p=g(2438),M=g(9009);function Pt(n,a){1&n&&t._UZ(0,"mat-progress-bar",3)}let rt=(()=>{class n{constructor(e){this.router=e,this.loading=!1,this.router.events.subscribe(i=>{switch(!0){case i instanceof y.OD:this.loading=!0;break;case i instanceof y.m2:case i instanceof y.gk:case i instanceof y.Q3:this.loading=!1}})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Pt,1,0,"mat-progress-bar",1),t._UZ(2,"router-outlet",null,2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.loading))},directives:[p.xw,p.yH,p.Wh,u.O5,y.lC,M.pW],styles:[""],data:{animation:[kt.g]}}),n})();var d=g(7396),h=g(5022),tt=g(1818),ct=g(6424),Z=g(9594),l=g(4798),_=g(9132),R=g(507),b=g(7852),F=g(4234),I=g(3868),ut=g(6167),A=g(888),et=g(3530),S=g(8866),q=g(86),pt=g(9112);const mt=function(n){return{backgroundColor:n}};function Dt(n,a){if(1&n&&t._UZ(0,"span",6),2&n){const e=t.oxw();t.Q6J("ngStyle",t.VKq(1,mt,null==e.information?null:e.information.color))}}function Ut(n,a){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"h4",1),t._uU(2,"Color"),t.qZA(),t.TgZ(3,"div",2),t._UZ(4,"span",7),t._uU(5),t.ALo(6,"uppercase"),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(4),t.Q6J("ngStyle",t.VKq(4,mt,null==e.information?null:e.information.color)),t.xp6(1),t.hij(" ",t.lcZ(6,2,null==e.information?null:e.information.color)," ")}}function Mt(n,a){if(1&n&&(t.TgZ(0,"span",2),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}let Jt=(()=>{class n{constructor(e){this.commonService=e,this.chains=[""]}ngOnChanges(){this.chains=[],this.chains.push("Bitcoin "+(this.information.network?this.commonService.titleCase(this.information.network):"Testnet"))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[t.TTD],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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div"),t.TgZ(2,"h4",1),t._uU(3,"Alias"),t.qZA(),t.TgZ(4,"div",2),t._uU(5),t.YNc(6,Dt,1,3,"span",3),t.qZA(),t.qZA(),t.YNc(7,Ut,7,6,"div",4),t.TgZ(8,"div"),t.TgZ(9,"h4",1),t._uU(10,"Implementation"),t.qZA(),t.TgZ(11,"div",2),t._uU(12),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h4",1),t._uU(15,"Chain"),t.qZA(),t.YNc(16,Mt,2,1,"span",5),t.qZA(),t.qZA()),2&e&&(t.xp6(5),t.hij(" ",null==i.information?null:i.information.alias," "),t.xp6(1),t.Q6J("ngIf",!i.showColorFieldSeparately),t.xp6(1),t.Q6J("ngIf",i.showColorFieldSeparately),t.xp6(5),t.Oqu(null!=i.information&&i.information.lnImplementation||null!=i.information&&i.information.version?(null==i.information?null:i.information.lnImplementation)+" "+(null==i.information?null:i.information.version):""),t.xp6(4),t.Q6J("ngForOf",i.chains))},directives:[p.xw,p.yH,p.Wh,u.O5,u.sg,u.PC,S.Zl],pipes:[u.gd],styles:[""]}),n})();function Yt(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div"),t.TgZ(2,"h4",3),t._uU(3,"Lightning"),t.qZA(),t.TgZ(4,"div",4),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",5),t.qZA(),t.TgZ(8,"div"),t.TgZ(9,"h4",3),t._uU(10,"On-chain"),t.qZA(),t.TgZ(11,"div",4),t._uU(12),t.ALo(13,"number"),t.qZA(),t._UZ(14,"mat-progress-bar",5),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h4",3),t._uU(17,"Total"),t.qZA(),t.TgZ(18,"div",4),t._uU(19),t.ALo(20,"number"),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(5),t.hij("",t.lcZ(6,5,e.balances.lightning)," Sats"),t.xp6(2),t.s9C("value",e.balances.lightning/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(13,7,e.balances.onchain)," Sats"),t.xp6(2),t.s9C("value",e.balances.onchain/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(20,9,e.balances.total)," Sats")}}function Qt(n,a){if(1&n&&(t.TgZ(0,"div",6),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let Ht=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,Yt,21,11,"div",0),t.YNc(1,Qt,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,M.pW],pipes:[u.JJ],styles:[""]}),n})();var x=g(8167),z=g(7444),G=g(5694),Y=g(7706);function Bt(n,a){if(1&n&&(t.TgZ(0,"div",19),t.TgZ(1,"span",20),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",6),t.TgZ(5,"mat-hint",21),t.TgZ(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",22),t._UZ(11,"fa-icon",23),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",24),t.TgZ(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA(),t.qZA(),t._UZ(19,"mat-progress-bar",25),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.xp6(1),t.AsE("",t.Dn7(3,9,(null==e?null:e.alias)||(null==e?null:e.shortChannelId),0,24),"",((null==e?null:e.alias)||(null==e?null:e.shortChannelId)).length>25?"...":"",""),t.xp6(6),t.hij("",t.xi3(9,13,(null==e?null:e.toLocal)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",i.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,16,(null==e?null:e.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,18,(null==e?null:e.toRemote)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function zt(n,a){if(1&n&&(t.TgZ(0,"div",17),t.YNc(1,Bt,20,21,"div",18),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}function Vt(n,a){if(1&n&&(t.TgZ(0,"div",3),t.TgZ(1,"div",4),t.TgZ(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"div",6),t.TgZ(5,"mat-hint",7),t.TgZ(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",9),t._UZ(11,"fa-icon",10),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",11),t.TgZ(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA(),t.qZA(),t._UZ(19,"mat-progress-bar",12),t.qZA(),t.TgZ(20,"div",13),t._UZ(21,"mat-divider",14),t.qZA(),t.TgZ(22,"div",15),t.YNc(23,zt,2,1,"div",16),t.qZA(),t.qZA()),2&n){const e=t.oxw(),i=t.MAs(2);t.xp6(8),t.hij("",t.xi3(9,7,(null==e.channelBalances?null:e.channelBalances.localBalance)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",e.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,12,(null==e.channelBalances?null:e.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("value",null!=e.channelBalances&&e.channelBalances.localBalance&&(null==e.channelBalances?null:e.channelBalances.localBalance)>0?+(null==e.channelBalances?null:e.channelBalances.localBalance)/(+(null==e.channelBalances?null:e.channelBalances.localBalance)+ +(null==e.channelBalances?null:e.channelBalances.remoteBalance))*100:0),t.xp6(4),t.Q6J("ngIf",e.allChannels&&(null==e.allChannels?null:e.allChannels.length)>0)("ngIfElse",i)}}function Gt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",26),t._uU(1," No channels available. "),t.TgZ(2,"button",27),t.NdJ("click",function(){return t.CHM(e),t.oxw().goToChannels()}),t._uU(3,"Open Channel"),t.qZA(),t.qZA()}}function Xt(n,a){if(1&n&&(t.TgZ(0,"div",28),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let $t=(()=>{class n{constructor(e){this.router=e,this.faBalanceScale=Z.DL8,this.faDumbbell=Z.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,Vt,24,15,"div",0),t.YNc(1,Gt,4,0,"ng-template",null,1,t.W1O),t.YNc(3,Xt,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,x.bx,I.BN,z.gM,M.pW,G.d,Y.$V,u.sg,q.lW],pipes:[u.JJ,u.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function Wt(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div",3),t.TgZ(2,"div"),t.TgZ(3,"h4",4),t._uU(4,"Daily"),t.qZA(),t.TgZ(5,"div",5),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.TgZ(8,"div"),t.TgZ(9,"h4",4),t._uU(10,"Weekly"),t.qZA(),t.TgZ(11,"div",5),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h4",4),t._uU(16,"Monthly"),t.qZA(),t.TgZ(17,"div",5),t._uU(18),t.ALo(19,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(20,"div",3),t.TgZ(21,"div"),t.TgZ(22,"h4",4),t._uU(23,"Transactions"),t.qZA(),t.TgZ(24,"div",5),t._uU(25),t.ALo(26,"number"),t.qZA(),t.qZA(),t.TgZ(27,"div"),t.TgZ(28,"h4",4),t._uU(29,"Transactions"),t.qZA(),t.TgZ(30,"div",5),t._uU(31),t.ALo(32,"number"),t.qZA(),t.qZA(),t.TgZ(33,"div"),t.TgZ(34,"h4",4),t._uU(35,"Transactions"),t.qZA(),t.TgZ(36,"div",5),t._uU(37),t.ALo(38,"number"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(6),t.hij("",t.lcZ(7,6,null==e.fees?null:e.fees.daily_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(13,8,null==e.fees?null:e.fees.weekly_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(19,10,null==e.fees?null:e.fees.monthly_fee)," Sats"),t.xp6(7),t.Oqu(t.lcZ(26,12,null==e.fees?null:e.fees.daily_txs)),t.xp6(6),t.Oqu(t.lcZ(32,14,null==e.fees?null:e.fees.weekly_txs)),t.xp6(6),t.Oqu(t.lcZ(38,16,null==e.fees?null:e.fees.monthly_txs))}}function Kt(n,a){if(1&n&&(t.TgZ(0,"div",6),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let jt=(()=>{class n{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){var e;if(null===(e=this.fees)||void 0===e?void 0:e.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}];const i=Math.ceil(Math.log(this.fees.monthly_fee+1)/Math.LN10),o=Math.pow(10,i-1);this.maxFeeValue=Math.ceil(this.fees.monthly_fee/o)*o/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 n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},features:[t.TTD],decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,Wt,39,18,"div",0),t.YNc(1,Kt,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function te(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div",3),t.TgZ(2,"div"),t.TgZ(3,"h4",4),t._uU(4,"Active"),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"span",6),t._uU(7),t.ALo(8,"number"),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h4",4),t._uU(11,"Pending"),t.qZA(),t.TgZ(12,"div",5),t._UZ(13,"span",7),t._uU(14),t.ALo(15,"number"),t.qZA(),t.qZA(),t.TgZ(16,"div"),t.TgZ(17,"h4",4),t._uU(18,"Inactive"),t.qZA(),t.TgZ(19,"div",5),t._UZ(20,"span",8),t._uU(21),t.ALo(22,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(23,"div",3),t.TgZ(24,"div"),t.TgZ(25,"h4",4),t._uU(26,"Capacity"),t.qZA(),t.TgZ(27,"div",5),t._uU(28),t.ALo(29,"number"),t.qZA(),t.qZA(),t.TgZ(30,"div"),t.TgZ(31,"h4",4),t._uU(32,"Capacity"),t.qZA(),t.TgZ(33,"div",5),t._uU(34),t.ALo(35,"number"),t.qZA(),t.qZA(),t.TgZ(36,"div"),t.TgZ(37,"h4",4),t._uU(38,"Capacity"),t.qZA(),t.TgZ(39,"div",5),t._uU(40),t.ALo(41,"number"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(7),t.Oqu(t.lcZ(8,6,(null==e.channelsStatus.active?null:e.channelsStatus.active.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(15,8,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(22,10,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.channels)||0)),t.xp6(7),t.hij("",t.lcZ(29,12,(null==e.channelsStatus.active?null:e.channelsStatus.active.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(35,14,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(41,16,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.capacity)||0)," Sats")}}function ee(n,a){if(1&n&&(t.TgZ(0,"div",9),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let ne=(()=>{class n{constructor(){this.channelsStatus={}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,te,42,18,"div",0),t.YNc(1,ee,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function ie(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19),t.TgZ(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toRemote||0,"1.0-0")," Sats")}}function ae(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19),t.TgZ(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toLocal||0,"1.0-0")," Sats")}}function oe(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toRemote||0)/i.totalLiquidity*100:0)}}function se(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toLocal||0)/i.totalLiquidity*100:0)}}function le(n,a){if(1&n&&(t.TgZ(0,"div",14),t.TgZ(1,"span",15),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",16),t.YNc(5,ie,5,4,"mat-hint",17),t.YNc(6,ae,5,4,"mat-hint",17),t.qZA(),t.YNc(7,oe,1,1,"mat-progress-bar",18),t.YNc(8,se,1,1,"mat-progress-bar",18),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.xp6(1),t.AsE("",t.Dn7(3,8,e.alias||e.shortChannelId,0,24),"",(e.alias||e.shortChannelId).length>25?"...":"",""),t.xp6(3),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction),t.xp6(1),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction)}}function re(n,a){if(1&n&&(t.TgZ(0,"div",12),t.YNc(1,le,9,12,"div",13),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}const ce=function(n,a,e){return{"mb-4":n,"mb-2":a,"mb-1":e}};function ue(n,a){if(1&n&&(t.TgZ(0,"div",3),t.TgZ(1,"div",4),t.TgZ(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"mat-hint",6),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",7),t.qZA(),t.TgZ(8,"div",8),t._UZ(9,"mat-divider",9),t.qZA(),t.TgZ(10,"div",10),t.YNc(11,re,2,1,"div",11),t.qZA(),t.qZA()),2&n){const e=t.oxw(),i=t.MAs(2);t.Q6J("ngClass",t.kEZ(7,ce,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)),t.xp6(5),t.hij("",t.xi3(6,4,e.totalLiquidity,"1.0-0")," Sats"),t.xp6(6),t.Q6J("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",i)}}function pe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).goToChannels()}),t._uU(1,"Open Channel"),t.qZA()}}function me(n,a){if(1&n&&(t.TgZ(0,"div",22),t._uU(1," No channels available. "),t.YNc(2,pe,2,0,"button",23),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf","Out"===e.direction)}}function de(n,a){if(1&n&&(t.TgZ(0,"div",25),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let he=(()=>{class n{constructor(e,i){this.router=e,this.commonService=i,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,ue,12,11,"div",0),t.YNc(1,me,3,1,"ng-template",null,1,t.W1O),t.YNc(3,de,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,u.mk,S.oO,x.bx,M.pW,G.d,Y.$V,u.sg,z.gM,q.lW],pipes:[u.JJ,u.OU],styles:[""]}),n})();var N=g(2605),J=g(181),L=g(8977),T=g(2262),r=g(4176),D=g(5304),O=g(4050),B=g(6309),m=g(9133),U=g(138),X=g(266),$=g(4786),k=g(6400),Q=g(6731);function ge(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function fe(n,a){if(1&n&&(t.TgZ(0,"mat-option",25),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(t.lcZ(2,2,e))}}function _e(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.invoiceError)}}function Ce(n,a){if(1&n&&(t.TgZ(0,"div",26),t._UZ(1,"fa-icon",27),t.YNc(2,_e,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.invoiceError)}}let xe=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.decimalPipe=s,this.commonService=c,this.actions=f,this.faExclamationTriangle=Z.eHv,this.selNode={},this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.timeUnitEnum=l.Qk,this.timeUnits=l.LO,this.selTimeUnit=l.Qk.SECS,this.invoiceError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.actions.pipe((0,h.R)(this.unSubs[2]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&"CreateInvoice"===e.payload.action&&(e.payload.status===l.Bn.ERROR&&(this.invoiceError=e.payload.message),e.payload.status===l.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(e){if(this.invoiceError="",!this.description)return!0;let i=this.expiry?this.expiry:3600;this.selTimeUnit!==l.Qk.SECS&&(i=this.commonService.convertTime(this.expiry,this.selTimeUnit,l.Qk.SECS));let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,O.Z$)({payload:o}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}onTimeUnitChange(e){this.expiry&&this.selTimeUnit!==e.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,e.value)),this.selTimeUnit=e.value}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(b.yh),t.Y36(u.JJ),t.Y36(F.v),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-create-invoices"]],decls:35,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-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(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Create Invoice"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"input",10),t.NdJ("ngModelChange",function(c){return i.description=c}),t.qZA(),t.YNc(13,ge,2,0,"mat-error",11),t.qZA(),t.TgZ(14,"div",12),t.TgZ(15,"mat-form-field",13),t.TgZ(16,"input",14),t.NdJ("ngModelChange",function(c){return i.invoiceValue=c})("keyup",function(){return i.onInvoiceValueChange()}),t.qZA(),t.TgZ(17,"span",15),t._uU(18," Sats "),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.qZA(),t.qZA(),t.TgZ(21,"mat-form-field",16),t.TgZ(22,"input",17),t.NdJ("ngModelChange",function(c){return i.expiry=c}),t.qZA(),t.TgZ(23,"span",15),t._uU(24),t.ALo(25,"titlecase"),t.qZA(),t.qZA(),t.TgZ(26,"mat-form-field",18),t.TgZ(27,"mat-select",19),t.NdJ("selectionChange",function(c){return i.onTimeUnitChange(c)}),t.YNc(28,fe,3,4,"mat-option",20),t.qZA(),t.qZA(),t.qZA(),t.YNc(29,Ce,3,2,"div",21),t.TgZ(30,"div",22),t.TgZ(31,"button",23),t.NdJ("click",function(){return i.resetData()}),t._uU(32,"Clear Field"),t.qZA(),t.TgZ(33,"button",24),t.NdJ("click",function(){t.CHM(o);const c=t.MAs(10);return i.onAddInvoice(c)}),t._uU(34,"Create Invoice"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.description),t.xp6(1),t.Q6J("ngIf",!i.description),t.xp6(3),t.Q6J("ngModel",i.invoiceValue)("step",100)("min",1),t.xp6(4),t.Oqu(i.invoiceValueHint),t.xp6(2),t.Q6J("ngModel",i.expiry)("step",i.selTimeUnit===i.timeUnitEnum.SECS?300:i.selTimeUnit===i.timeUnitEnum.MINS?10:i.selTimeUnit===i.timeUnitEnum.HOURS?2:1)("min",1),t.xp6(2),t.hij(" ",t.lcZ(25,14,i.selTimeUnit)," "),t.xp6(3),t.Q6J("value",i.selTimeUnit),t.xp6(1),t.Q6J("ngForOf",i.timeUnits),t.xp6(1),t.Q6J("ngIf",""!==i.invoiceError))},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,D.ZT,A.dn,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,m.wV,m.qQ,$.q,x.R9,x.bx,k.gD,u.sg,x.TO,Q.ey,I.BN],pipes:[u.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var ye=g(8468),v=g(4097);function Ze(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function Te(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5),t.TgZ(2,"mat-form-field",6),t.TgZ(3,"input",7),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().description=o}),t.qZA(),t.YNc(4,Ze,2,0,"mat-error",8),t.qZA(),t.TgZ(5,"mat-form-field",9),t.TgZ(6,"input",10,11),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().invoiceValue=o})("keyup",function(){return t.CHM(e),t.oxw().onInvoiceValueChange()}),t.qZA(),t.TgZ(8,"span",12),t._uU(9," Sats "),t.qZA(),t.TgZ(10,"mat-hint"),t._uU(11),t.qZA(),t.qZA(),t.TgZ(12,"div",13),t.TgZ(13,"button",14),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(14,"Clear Field"),t.qZA(),t.TgZ(15,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.MAs(1);return t.oxw().onAddInvoice(o)}),t._uU(16,"Create Invoice"),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.description),t.xp6(1),t.Q6J("ngIf",!e.description),t.xp6(2),t.Q6J("ngModel",e.invoiceValue)("step",100)("min",1),t.xp6(5),t.Oqu(e.invoiceValueHint)}}function Ae(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"button",17),t.NdJ("click",function(){return t.CHM(e),t.oxw().openCreateInvoiceModal()}),t._uU(2,"Create Invoice"),t.qZA(),t.qZA()}}function Le(n,a){1&n&&t._UZ(0,"mat-progress-bar",47)}function ve(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Created "),t.qZA())}const nt=function(n){return{"mr-0":n}};function be(n,a){if(1&n&&t._UZ(0,"span",53),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,nt,e.screenSize===e.screenSizeEnum.XS))}}function Se(n,a){if(1&n&&t._UZ(0,"span",54),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,nt,e.screenSize===e.screenSizeEnum.XS))}}function we(n,a){if(1&n&&t._UZ(0,"span",55),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,nt,e.screenSize===e.screenSizeEnum.XS))}}function Ee(n,a){if(1&n&&(t.TgZ(0,"td",49),t.YNc(1,be,1,3,"span",50),t.YNc(2,Se,1,3,"span",51),t.YNc(3,we,1,3,"span",52),t._uU(4),t.ALo(5,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","received"===e.status),t.xp6(1),t.Q6J("ngIf","unpaid"===e.status),t.xp6(1),t.Q6J("ngIf",!e.status||"expired"===e.status||"unknown"===e.status),t.xp6(1),t.hij(" ",t.xi3(5,4,1e3*e.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function qe(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Settled "),t.qZA())}function Ie(n,a){if(1&n&&(t.TgZ(0,"td",49),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.receivedAt,"dd/MMM/YYYY HH:mm")||"-")}}function Fe(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Description "),t.qZA())}const Oe=function(n){return{"max-width":n}};function Re(n,a){if(1&n&&(t.TgZ(0,"td",49),t.TgZ(1,"div",56),t.TgZ(2,"span",57),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Oe,i.screenSize===i.screenSizeEnum.XS?"10rem":"32rem")),t.xp6(2),t.Oqu(e.description)}}function Ne(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount (Sats) "),t.qZA())}function ke(n,a){if(1&n&&(t.TgZ(0,"td",59),t.TgZ(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amount?t.xi3(3,1,e.amount,"1.0-0"):"-","")}}function Pe(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount Settled (Sats) "),t.qZA())}function De(n,a){if(1&n&&(t.TgZ(0,"td",59),t.TgZ(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amountSettled?t.xi3(3,1,e.amountSettled,"1.0-0"):"-","")}}function Ue(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",61),t.TgZ(1,"div",62),t.TgZ(2,"mat-select",63),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}const Me=function(n){return{"px-3":n}};function Je(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",65),t.TgZ(1,"div",66),t.TgZ(2,"mat-select",67),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onInvoiceClick(s)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onRefreshInvoice(s)}),t._uU(7,"Refresh"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Me,e.screenSize!==e.screenSizeEnum.XS))}}function Ye(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No invoice available."),t.qZA())}function Qe(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting invoices..."),t.qZA())}function He(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Be(n,a){if(1&n&&(t.TgZ(0,"td",68),t.YNc(1,Ye,2,0,"p",8),t.YNc(2,Qe,2,0,"p",8),t.YNc(3,He,2,1,"p",8),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const ze=function(n){return{"display-none":n}};function Ve(n,a){if(1&n&&t._UZ(0,"tr",69),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,ze,(null==e.invoices?null:e.invoices.data)&&(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)>0))}}function Ge(n,a){1&n&&t._UZ(0,"tr",70)}function Xe(n,a){1&n&&t._UZ(0,"tr",71)}const $e=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},We=function(){return["no_invoice"]};function Ke(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",18),t.TgZ(1,"div",19),t.TgZ(2,"div",20),t._UZ(3,"fa-icon",21),t.TgZ(4,"span",22),t._uU(5,"Invoices History"),t.qZA(),t.qZA(),t.TgZ(6,"mat-form-field",23),t.TgZ(7,"input",24),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",25),t.YNc(9,Le,1,0,"mat-progress-bar",26),t.TgZ(10,"table",27,28),t.ynx(12,29),t.YNc(13,ve,2,0,"th",30),t.YNc(14,Ee,6,7,"td",31),t.BQk(),t.ynx(15,32),t.YNc(16,qe,2,0,"th",30),t.YNc(17,Ie,3,4,"td",31),t.BQk(),t.ynx(18,33),t.YNc(19,Fe,2,0,"th",30),t.YNc(20,Re,4,4,"td",31),t.BQk(),t.ynx(21,34),t.YNc(22,Ne,2,0,"th",35),t.YNc(23,ke,4,4,"td",36),t.BQk(),t.ynx(24,37),t.YNc(25,Pe,2,0,"th",35),t.YNc(26,De,4,4,"td",36),t.BQk(),t.ynx(27,38),t.YNc(28,Ue,6,0,"th",39),t.YNc(29,Je,8,3,"td",40),t.BQk(),t.ynx(30,41),t.YNc(31,Be,4,3,"td",42),t.BQk(),t.YNc(32,Ve,1,3,"tr",43),t.YNc(33,Ge,1,0,"tr",44),t.YNc(34,Xe,1,0,"tr",45),t.qZA(),t.qZA(),t._UZ(35,"mat-paginator",46),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.invoices)("ngClass",t.VKq(12,$e,""!==e.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,We)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let dt=(()=>{class n{constructor(e,i,o,s,c,f){this.logger=e,this.store=i,this.decimalPipe=o,this.commonService=s,this.datePipe=c,this.actions=f,this.calledFrom="transactions",this.faHistory=Z.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.selFilter="",this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","amountSettled","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","receivedAt","description","amount","amountSettled","actions"])}ngOnInit(){this.store.select(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Ef).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.invoiceJSONArr=e.invoices&&e.invoices.length>0?e.invoices:[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SET_LOOKUP_ECL&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&e.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(e.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,v.qR)({payload:{data:{pageSize:this.pageSize,component:xe}}}))}onAddInvoice(e){if(!this.description)return!0;const i=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue;let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,O.Z$)({payload:o})),this.resetData()}onInvoiceClick(e){this.store.dispatch((0,v.qR)({payload:{data:{invoice:e,newlyAdded:!1,component:ye.R}}}))}onRefreshInvoice(e){this.store.dispatch((0,O.n7)({payload:e.paymentHash}))}updateInvoicesData(e){this.invoiceJSONArr=this.invoiceJSONArr.map(i=>i.paymentHash===e.paymentHash?e:i)}loadInvoicesTable(e){this.invoices=new r.by(e?[...e]:[]),this.invoices.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.invoices.paginator=this.paginator,this.applyFilter()}resetData(){this.description="",this.invoiceValue=null,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[4])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(u.JJ),t.Y36(F.v),t.Y36(u.uU),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-invoices"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",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-1",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/Unknown","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/Unknown","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"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Te,17,6,"form",1),t.YNc(2,Ae,3,0,"div",2),t.YNc(3,Ke,36,15,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,m.wV,m.qQ,$.q,x.R9,x.bx,q.lW,x.TO,I.BN,Y.$V,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,z.gM,u.PC,S.Zl,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],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}"]}),n})();var H=g(3453),it=g(9552),ht=g(8020);const je=["paymentReq"];function tn(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function en(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function nn(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function an(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment amount is required."),t.qZA())}function on(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1),t.TgZ(1,"input",17,18),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().paymentAmount=o})("change",function(o){return t.CHM(e),t.oxw().onAmountChange(o)}),t.qZA(),t.TgZ(3,"mat-hint"),t._uU(4,"It is a zero amount invoice, enter amount to be paid."),t.qZA(),t.YNc(5,an,2,0,"mat-error",11),t.qZA()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.paymentAmount),t.xp6(4),t.Q6J("ngIf",!e.paymentAmount)}}function sn(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentError)}}function ln(n,a){if(1&n&&(t.TgZ(0,"div",19),t._UZ(1,"fa-icon",20),t.YNc(2,sn,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.paymentError)}}let rn=(()=>{class n{constructor(e,i,o,s,c,f,P,C){this.dialogRef=e,this.store=i,this.eclEffects=o,this.logger=s,this.commonService=c,this.decimalPipe=f,this.actions=P,this.dataService=C,this.faExclamationTriangle=Z.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.feeLimitTypes=l.Vc,this.paymentError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activeChannels=e.activeChannels,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_PAYMENT_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SEND_PAYMENT_STATUS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"SendPayment"===e.payload.action&&(delete this.paymentDecoded.amount,this.paymentError=e.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((0,H.q)(1)).subscribe({next:e=>{this.paymentDecoded=e,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.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+i.symbol+this.decimalPipe.transform(i.OTHER?i.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:e=>{this.logger.error(e),this.paymentDecodedHint="ERROR: "+(e.message?e.message:"string"==typeof e?e:JSON.stringify(e)),this.paymentReq.control.setErrors({decodeError:!0})}}))}sendPayment(){this.store.dispatch((0,O.oV)(this.zeroAmtInvoice?{payload:{invoice:this.paymentRequest,amountMsat:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{invoice:this.paymentRequest,fromDialog:!0}}))}onPaymentRequestEntry(e){this.paymentRequest=e&&"string"==typeof e?e.trim():e,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((0,H.q)(1)).subscribe({next:i=>{this.paymentDecoded=i,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.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:i=>{this.logger.error(i),this.paymentDecodedHint="ERROR: "+(i.message?i.message:"string"==typeof i?i:JSON.stringify(i)),this.paymentReq.control.setErrors({decodeError:!0})}}))}onAmountChange(e){delete this.paymentDecoded.amount,this.paymentDecoded.amount=e}resetData(){this.paymentDecoded={},this.paymentRequest="",this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(b.yh),t.Y36(it.o),t.Y36(R.mQ),t.Y36(F.v),t.Y36(u.JJ),t.Y36(B.eX),t.Y36(ht.D))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-send-payments"]],viewQuery:function(e,i){if(1&e&&t.Gf(je,5),2&e){let o;t.iGM(o=t.CRH())&&(i.paymentReq=o.first)}},decls:24,vars:7,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","rows","4","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-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-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(e,i){if(1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Send Payment"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.TgZ(11,"mat-form-field",1),t.TgZ(12,"textarea",9,10),t.NdJ("ngModelChange",function(s){return i.onPaymentRequestEntry(s)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(14,tn,2,1,"mat-hint",11),t.YNc(15,en,2,0,"mat-error",11),t.YNc(16,nn,2,1,"mat-error",11),t.qZA(),t.YNc(17,on,6,2,"mat-form-field",12),t.YNc(18,ln,3,2,"div",13),t.TgZ(19,"div",14),t.TgZ(20,"button",15),t.NdJ("click",function(){return i.resetData()}),t._uU(21,"Clear Fields"),t.qZA(),t.TgZ(22,"button",16),t.NdJ("click",function(){return i.onSendPayment()}),t._uU(23,"Send Payment"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e){const o=t.MAs(13);t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.paymentRequest),t.xp6(2),t.Q6J("ngIf",i.paymentRequest&&""!==i.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!i.paymentRequest),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.decodeError),t.xp6(1),t.Q6J("ngIf",i.zeroAmtInvoice),t.xp6(1),t.Q6J("ngIf",""!==i.paymentError)}},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,D.ZT,A.dn,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,x.bx,x.TO,I.BN],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}"]}),n})();var V=g(3050);const cn=["scrollContainer"];function un(n,a){if(1&n&&(t.TgZ(0,"div",9),t.TgZ(1,"div",1),t.TgZ(2,"h4",11),t._uU(3,"Description"),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(5),t.Oqu(e.description)}}function pn(n,a){1&n&&t._UZ(0,"mat-divider",14)}function mn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-expansion-panel",23),t.NdJ("opened",function(){return t.CHM(e),t.oxw().onExpansionOpen(!0)})("closed",function(){return t.CHM(e),t.oxw().onExpansionOpen(!1)}),t.TgZ(1,"mat-expansion-panel-header"),t.TgZ(2,"mat-panel-title"),t.TgZ(3,"h4",24),t._uU(4),t.qZA(),t.TgZ(5,"h4",25),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",8),t.TgZ(9,"div",9),t.TgZ(10,"div",26),t.TgZ(11,"h4",11),t._uU(12,"Fees (mSats)"),t.qZA(),t.TgZ(13,"span",12),t._uU(14),t.ALo(15,"number"),t.qZA(),t.qZA(),t.TgZ(16,"div",26),t.TgZ(17,"h4",11),t._uU(18,"Date/Time"),t.qZA(),t.TgZ(19,"span",12),t._uU(20),t.ALo(21,"date"),t.qZA(),t.qZA(),t.qZA(),t._UZ(22,"mat-divider",14),t.TgZ(23,"div",9),t.TgZ(24,"div",1),t.TgZ(25,"h4",11),t._uU(26,"ID"),t.qZA(),t.TgZ(27,"span",27),t._uU(28),t.qZA(),t.qZA(),t.qZA(),t._UZ(29,"mat-divider",14),t.TgZ(30,"div",9),t.TgZ(31,"div",1),t.TgZ(32,"h4",11),t._uU(33,"To Channel"),t.qZA(),t.TgZ(34,"span",27),t._uU(35),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit,i=a.index,o=t.oxw();t.Q6J("expanded",o.expansionOpen),t.xp6(4),t.hij("Part ",i+1,""),t.xp6(2),t.hij("",t.lcZ(7,7,e.amount)," (Sats)"),t.xp6(8),t.Oqu(t.lcZ(15,9,e.feesPaid)),t.xp6(6),t.Oqu(t.xi3(21,11,e.timestamp,"dd/MMM/YYYY HH:mm")),t.xp6(8),t.Oqu(e.id),t.xp6(7),t.Oqu(e.toChannelAlias)}}let dn=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,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(e){this.expansionOpen=e}onClose(){this.dialogRef.close(!1)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-payment-information"]],viewQuery:function(e,i){if(1&e&&t.Gf(cn,5),2&e){let o;t.iGM(o=t.CRH())&&(i.scrollContainer=o.first)}},decls:66,vars:15,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["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,"h-40","padding-gap-x-large",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"],["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","padding-gap-x-large"],["mat-mini-fab","","aria-label","Scroll Down","fxLayoutAlign","center center",3,"click"],["fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",1,"padding-gap-x-large","padding-gap-bottom-large"],["fxLayoutAlign","center center","tabindex","1","mat-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Payment Information"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6,7),t.TgZ(10,"div",8),t.TgZ(11,"div",9),t.TgZ(12,"div",10),t.TgZ(13,"h4",11),t._uU(14,"Amount (Sats)"),t.qZA(),t.TgZ(15,"span",12),t._uU(16),t.ALo(17,"number"),t.qZA(),t.qZA(),t.TgZ(18,"div",13),t.TgZ(19,"h4",11),t._uU(20,"Date/Time"),t.qZA(),t.TgZ(21,"span",12),t._uU(22),t.ALo(23,"date"),t.qZA(),t.qZA(),t.qZA(),t._UZ(24,"mat-divider",14),t.TgZ(25,"div",9),t.TgZ(26,"div",1),t.TgZ(27,"h4",11),t._uU(28,"ID"),t.qZA(),t.TgZ(29,"span",12),t._uU(30),t.qZA(),t.qZA(),t.qZA(),t._UZ(31,"mat-divider",14),t.TgZ(32,"div",9),t.TgZ(33,"div",1),t.TgZ(34,"h4",11),t._uU(35,"Payment Hash"),t.qZA(),t.TgZ(36,"span",12),t._uU(37),t.qZA(),t.qZA(),t.qZA(),t._UZ(38,"mat-divider",14),t.TgZ(39,"div",9),t.TgZ(40,"div",1),t.TgZ(41,"h4",11),t._uU(42,"Payment Preimage"),t.qZA(),t.TgZ(43,"span",12),t._uU(44),t.qZA(),t.qZA(),t.qZA(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9),t.TgZ(47,"div",1),t.TgZ(48,"h4",11),t._uU(49,"Recipient Node"),t.qZA(),t.TgZ(50,"span",12),t._uU(51),t.qZA(),t.qZA(),t.qZA(),t._UZ(52,"mat-divider",14),t.YNc(53,un,6,1,"div",15),t.YNc(54,pn,1,0,"mat-divider",16),t.TgZ(55,"div",9),t.TgZ(56,"div",1),t.TgZ(57,"mat-accordion"),t.YNc(58,mn,36,14,"mat-expansion-panel",17),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(59,"div",18),t.TgZ(60,"button",19),t.NdJ("click",function(){return i.onScrollDown()}),t.TgZ(61,"mat-icon",20),t._uU(62,"arrow_downward"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(63,"div",21),t.TgZ(64,"button",22),t._uU(65,"OK"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(16),t.Oqu(t.lcZ(17,10,i.payment.recipientAmount)),t.xp6(6),t.Oqu(t.xi3(23,12,i.payment.firstPartTimestamp,"dd/MMM/YYYY HH:mm")),t.xp6(8),t.Oqu(i.payment.id),t.xp6(7),t.Oqu(i.payment.paymentHash),t.xp6(7),t.Oqu(i.payment.paymentPreimage),t.xp6(7),t.Oqu(i.payment.recipientNodeAlias),t.xp6(2),t.Q6J("ngIf",i.description),t.xp6(1),t.Q6J("ngIf",i.description),t.xp6(4),t.Q6J("ngForOf",i.payment.parts),t.xp6(6),t.Q6J("mat-dialog-close",!1))},directives:[p.xw,p.Wh,p.yH,A.dk,q.lW,A.dn,Y.$V,G.d,u.O5,V.pp,u.sg,pt.Hw,D.ZT,V.ib,V.yz,V.yK],pipes:[u.JJ,u.uU],styles:[""]}),n})();var K=g(6718);const hn=["sendPaymentForm"];function gn(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function fn(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function _n(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5),t.TgZ(2,"mat-form-field",6),t.TgZ(3,"textarea",7,8),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(5,gn,2,1,"mat-hint",9),t.YNc(6,fn,2,0,"mat-error",9),t.qZA(),t.TgZ(7,"div",10),t.TgZ(8,"button",11),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(9,"Clear Field"),t.qZA(),t.TgZ(10,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSendPayment()}),t._uU(11,"Send Payment"),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.paymentRequest),t.xp6(2),t.Q6J("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!e.paymentRequest)}}function Cn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().openSendPaymentModal()}),t._uU(2,"Send Payment"),t.qZA(),t.qZA()}}function xn(n,a){1&n&&t._UZ(0,"mat-progress-bar",48)}function yn(n,a){1&n&&(t.TgZ(0,"th",49),t._uU(1,"Date/Time"),t.qZA())}function Zn(n,a){if(1&n&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,null==e?null:e.firstPartTimestamp,"dd/MMM/YYYY HH:mm"))}}function Tn(n,a){1&n&&(t.TgZ(0,"th",49),t._uU(1,"ID"),t.qZA())}const W=function(n){return{"max-width":n}};function An(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",51),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function Ln(n,a){1&n&&(t.TgZ(0,"th",49),t._uU(1,"Destination"),t.qZA())}function vn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",51),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.recipientNodeAlias)}}function bn(n,a){1&n&&(t.TgZ(0,"th",53),t._uU(1,"Amount (Sats)"),t.qZA())}function Sn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"span",54),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.recipientAmount))}}function wn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",55),t.TgZ(1,"div",56),t.TgZ(2,"mat-select",57),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function En(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",59),t.TgZ(1,"button",60),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onPaymentClick(s)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function qn(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No payment available."),t.qZA())}function In(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting payments..."),t.qZA())}function Fn(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function On(n,a){if(1&n&&(t.TgZ(0,"td",61),t.YNc(1,qn,2,0,"p",9),t.YNc(2,In,2,0,"p",9),t.YNc(3,Fn,2,1,"p",9),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function Rn(n,a){if(1&n&&(t.TgZ(0,"span",64),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function Nn(n,a){if(1&n&&(t.ynx(0),t.YNc(1,Rn,3,4,"span",63),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function kn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"span",62),t._uU(2),t.qZA(),t.YNc(3,Nn,2,1,"ng-container",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" Total Attempts: ",null==e||null==e.parts?null:e.parts.length," "),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Pn(n,a){if(1&n&&(t.TgZ(0,"span",62),t.TgZ(1,"span",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function Dn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Pn,4,4,"span",66),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Un(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Dn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Mn(n,a){if(1&n&&(t.TgZ(0,"span",62),t.TgZ(1,"span",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.toChannelAlias)}}function Jn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Mn,4,4,"span",66),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Yn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Jn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(null==e?null:e.recipientNodeAlias),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Qn(n,a){if(1&n&&(t.TgZ(0,"span",67),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.amount,"1.0-0")," ")}}function Hn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Qn,3,4,"span",68),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Bn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"span",67),t._uU(2),t.ALo(3,"number"),t.qZA(),t.YNc(4,Hn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.xi3(3,2,null==e?null:e.recipientAmount,"1.0-0")),t.xp6(2),t.Q6J("ngIf",e.is_expanded)}}function zn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",70),t.TgZ(1,"button",73),t.NdJ("click",function(){const s=t.CHM(e).$implicit,c=t.oxw(2).$implicit;return t.oxw(2).onPartClick(s,c)}),t._uU(2),t.qZA(),t.qZA()}if(2&n){const e=a.index;t.xp6(2),t.hij("View ",e+1,"")}}function Vn(n,a){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,zn,3,1,"div",72),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Gn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",69),t.TgZ(1,"span",70),t.TgZ(2,"button",71),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return s.is_expanded=!s.is_expanded}),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Vn,2,1,"div",9),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(3),t.Oqu(e.is_expanded?"Hide":"Show"),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Xn(n,a){1&n&&t._UZ(0,"tr",74)}const $n=function(n){return{"display-none":n}};function Wn(n,a){if(1&n&&t._UZ(0,"tr",75),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,$n,(null==e.payments?null:e.payments.data)&&(null==e.payments||null==e.payments.data?null:e.payments.data.length)>0))}}function Kn(n,a){1&n&&t._UZ(0,"tr",76)}function jn(n,a){1&n&&t._UZ(0,"tr",74)}const ti=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},ei=function(){return["no_payment"]};function ni(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"div",15),t.TgZ(2,"div",16),t._UZ(3,"fa-icon",17),t.TgZ(4,"span",18),t._uU(5,"Payments History"),t.qZA(),t.qZA(),t.TgZ(6,"mat-form-field",19),t.TgZ(7,"input",20),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",21),t.YNc(9,xn,1,0,"mat-progress-bar",22),t.TgZ(10,"table",23,24),t.ynx(12,25),t.YNc(13,yn,2,0,"th",26),t.YNc(14,Zn,3,4,"td",27),t.BQk(),t.ynx(15,28),t.YNc(16,Tn,2,0,"th",26),t.YNc(17,An,4,4,"td",27),t.BQk(),t.ynx(18,29),t.YNc(19,Ln,2,0,"th",26),t.YNc(20,vn,4,4,"td",27),t.BQk(),t.ynx(21,30),t.YNc(22,bn,2,0,"th",31),t.YNc(23,Sn,4,3,"td",27),t.BQk(),t.ynx(24,32),t.YNc(25,wn,6,0,"th",33),t.YNc(26,En,3,0,"td",34),t.BQk(),t.ynx(27,35),t.YNc(28,On,4,3,"td",36),t.BQk(),t.ynx(29,37),t.YNc(30,kn,4,2,"td",27),t.BQk(),t.ynx(31,38),t.YNc(32,Un,5,5,"td",27),t.BQk(),t.ynx(33,39),t.YNc(34,Yn,5,5,"td",27),t.BQk(),t.ynx(35,40),t.YNc(36,Bn,5,5,"td",27),t.BQk(),t.ynx(37,41),t.YNc(38,Gn,5,2,"td",42),t.BQk(),t.YNc(39,Xn,1,0,"tr",43),t.YNc(40,Wn,1,3,"tr",44),t.YNc(41,Kn,1,0,"tr",45),t.YNc(42,jn,1,0,"tr",46),t.qZA(),t.qZA(),t._UZ(43,"mat-paginator",47),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.payments)("ngClass",t.VKq(14,ti,""!==e.errorMessage)),t.xp6(29),t.Q6J("matRowDefColumns",e.partColumns)("matRowDefWhen",e.is_group),t.xp6(1),t.Q6J("matFooterRowDef",t.DdM(16,ei)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let gt=(()=>{class n{constructor(e,i,o,s,c,f,P){this.logger=e,this.commonService=i,this.store=o,this.rtlEffects=s,this.decimalPipe=c,this.dataService=f,this.datePipe=P,this.calledFrom="transactions",this.faHistory=Z.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.paymentDecoded={},this.displayedColumns=[],this.partColumns=[],this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","actions"],this.partColumns=["groupTotal","groupAction"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","recipientAmount","actions"],this.partColumns=["groupTotal","groupAmount","groupAction"]):this.screenSize===l.cu.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(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.PP).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paymentJSONArr=e.payments&&e.payments.sent&&e.payments.sent.length>0?e.payments.sent:[],this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(e)})}ngAfterViewInit(){this.loadPaymentsTable(this.paymentJSONArr)}loadPaymentsTable(e){this.payments=new r.by(e?[...e]:[]),this.payments.sort=this.sort,this.payments.sortingDataAccessor=(i,o)=>{switch(o){case"firstPartTimestamp":return this.commonService.sortByKey(i.parts,"timestamp","number",this.sort.direction),i.firstPartTimestamp;case"id":return this.commonService.sortByKey(i.parts,"id","string",this.sort.direction),i.id;case"recipientNodeAlias":return this.commonService.sortByKey(i.parts,"toChannelAlias","string",this.sort.direction),i.recipientNodeAlias;case"recipientAmount":return this.commonService.sortByKey(i.parts,"amount","number",this.sort.direction),i.recipientAmount;default:return i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null}},this.payments.filterPredicate=(i,o)=>((i.firstPartTimestamp?this.datePipe.transform(new Date(i.firstPartTimestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.payments.paginator=this.paginator,this.applyFilter()}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,H.q)(1)).subscribe(e=>{this.paymentDecoded=e,this.paymentDecoded.timestamp?(this.paymentDecoded.amount||(this.paymentDecoded.amount=0),this.sendPayment()):this.resetData()})}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.paymentHash,this.paymentDecoded.amount&&0!==this.paymentDecoded.amount?(this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.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:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:50,type:l.Gi.DATE_TIME},{key:"amount",value:this.paymentDecoded.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,H.q)(1)).subscribe(i=>{i&&(this.store.dispatch((0,O.oV)({payload:{invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.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:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:40,type:l.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:l.Gi.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:l.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,H.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.amount=o[0].inputValue,this.store.dispatch((0,O.oV)({payload:{invoice:this.paymentRequest,amountMsat:1e3*o[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(e){this.paymentRequest=e,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,H.q)(1)).subscribe(i=>{this.paymentDecoded=i,this.paymentDecoded.amount?this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="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((0,v.qR)({payload:{data:{component:rn}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}is_group(e,i){return i.parts&&i.parts.length>1}onPaymentClick(e){e.paymentHash&&""!==e.paymentHash.trim()?this.dataService.decodePayments(e.paymentHash).pipe((0,H.q)(1)).subscribe({next:i=>{this.showPaymentView(e,i[0]||[])},error:i=>{this.showPaymentView(e,[])}}):this.showPaymentView(e,[])}showPaymentView(e,i){this.store.dispatch((0,v.qR)({payload:{data:{sentPaymentInfo:i,payment:e,component:dn}}}))}onPartClick(e,i){i.paymentHash&&""!==i.paymentHash.trim()?this.dataService.decodePayments(i.paymentHash).pipe((0,H.q)(1)).subscribe({next:o=>{this.showPartView(e,i,o)},error:o=>{this.showPartView(e,i,[])}}):this.showPartView(e,i,[])}showPartView(e,i,o){const s=[[{key:"paymentHash",value:i.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"paymentPreimage",value:i.paymentPreimage,title:"Payment Preimage",width:100,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"Channel",width:100,type:l.Gi.STRING}],[{key:"id",value:e.id,title:"Part ID",width:50,type:l.Gi.STRING},{key:"timestamp",value:e.timestamp,title:"Time",width:50,type:l.Gi.DATE_TIME}],[{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER},{key:"feesPaid",value:e.feesPaid,title:"Fee (Sats)",width:50,type:l.Gi.NUMBER}]];o.length>0&&o[0].paymentRequest&&o[0].paymentRequest.description&&""!==o[0].paymentRequest.description&&s.splice(3,0,[{key:"description",value:o[0].paymentRequest.description,title:"Description",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Payment Part Information",message:s}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const e=JSON.parse(JSON.stringify(this.payments.data)),i=e.reduce((o,s)=>(s.paymentHash&&""!==s.paymentHash.trim()&&(o=""===o?s.paymentHash:o+","+s.paymentHash),o),"");this.dataService.decodePayments(i).pipe((0,h.R)(this.unSubs[4])).subscribe(o=>{o.forEach((c,f)=>{c.length>0&&c[0].paymentRequest&&c[0].paymentRequest.description&&""!==c[0].paymentRequest.description&&(e[f].description=c[0].paymentRequest.description)});const s=e.reduce((c,f)=>c.concat(f),[]);this.commonService.downloadFile(s,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(K.V),t.Y36(u.JJ),t.Y36(ht.D),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-payments"]],viewQuery:function(e,i){if(1&e&&(t.Gf(hn,5),t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,_n,12,3,"form",1),t.YNc(2,Cn,3,0,"div",2),t.YNc(3,ni,44,17,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,m.Q7,Y.$V,m.JJ,m.On,q.lW,x.bx,x.TO,I.BN,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.nj,r.Ke,r.as,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,k.gD,k.$L,Q.ey,r.yh,u.sg,r.Gk,r.Q2,r.XQ],pipes:[u.uU,u.JJ],styles:[".mat-column-id[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%]{padding:0 1rem;flex:0 0 25%;width:25%}.mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.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}"]}),n})();function ii(n,a){if(1&n&&(t.TgZ(0,"button",26),t.TgZ(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA(),t.qZA()),2&n){t.oxw();const e=t.MAs(11);t.Q6J("matMenuTriggerFor",e)}}function ai(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).onNavigateTo("/ecl/reports")}),t._uU(1,"Fees Summary"),t.qZA()}}function oi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).onsortChannelsBy()}),t._uU(1),t.qZA()}if(2&n){const e=t.oxw(3);t.xp6(1),t.hij("Sort By ","Balance Score"===e.sortField?"Capacity":"Balance Score","")}}function si(n,a){1&n&&t._UZ(0,"mat-progress-bar",27)}function li(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",28),2&n){const e=t.oxw(3);t.Q6J("information",e.information)("showColorFieldSeparately",!1)}}function ri(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",29),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function ci(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-capacity-info",30),2&n){const e=t.oxw(3);t.Q6J("sortBy",e.sortField)("channelBalances",e.channelBalances)("allChannels",e.allChannelsCapacity)("errorMessage",e.errorMessages[2])}}function ui(n,a){if(1&n&&t._UZ(0,"rtl-ecl-fee-info",31),2&n){const e=t.oxw(3);t.Q6J("fees",e.fees)("errorMessage",e.errorMessages[1])}}function pi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-status-info",32),2&n){const e=t.oxw(3);t.Q6J("channelsStatus",e.channelsStatus)("errorMessage",e.errorMessages[2])}}function mi(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const ft=function(n){return{"dashboard-card-content":!0,"error-border":n}};function di(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-grid-tile",8),t.TgZ(1,"mat-card",9),t.TgZ(2,"mat-card-header"),t.TgZ(3,"mat-card-title",10),t.TgZ(4,"div"),t._UZ(5,"fa-icon",11),t.TgZ(6,"span"),t._uU(7),t.qZA(),t.qZA(),t.TgZ(8,"div"),t.YNc(9,ii,3,1,"button",12),t.TgZ(10,"mat-menu",13,14),t.TgZ(12,"button",15),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onNavigateTo(s.link)}),t._uU(13),t.qZA(),t.YNc(14,ai,2,0,"button",16),t.YNc(15,oi,2,1,"button",16),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(16,"mat-card-content",17),t.YNc(17,si,1,0,"mat-progress-bar",18),t.TgZ(18,"div",19),t.YNc(19,li,1,2,"rtl-ecl-node-info",20),t.YNc(20,ri,1,2,"rtl-ecl-balances-info",21),t.YNc(21,ci,1,4,"rtl-ecl-channel-capacity-info",22),t.YNc(22,ui,1,2,"rtl-ecl-fee-info",23),t.YNc(23,pi,1,2,"rtl-ecl-channel-status-info",24),t.YNc(24,mi,2,0,"h3",25),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(5),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.link),t.xp6(4),t.hij("Go To ",e.goTo,""),t.xp6(1),t.Q6J("ngIf","fee"===e.id),t.xp6(1),t.Q6J("ngIf","capacity"===e.id),t.xp6(1),t.s9C("fxFlex","capacity"===e.id?90:70),t.Q6J("ngClass",t.VKq(17,ft,"node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.ERROR)||("capacity"===e.id||"status"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||"fee"===e.id&&i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR)),t.xp6(1),t.Q6J("ngIf","node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.INITIATED)||("capacity"===e.id||"status"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||"fee"===e.id&&i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","capacity"),t.xp6(1),t.Q6J("ngSwitchCase","fee"),t.xp6(1),t.Q6J("ngSwitchCase","status")}}function hi(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div",3),t._UZ(2,"fa-icon",4),t.TgZ(3,"span",5),t._uU(4),t.qZA(),t.qZA(),t.TgZ(5,"mat-grid-list",6),t.YNc(6,di,25,19,"mat-grid-tile",7),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("icon",e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.ERROR?e.faFrown:e.faSmile),t.xp6(2),t.Oqu(e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.COMPLETED?"Welcome "+e.information.alias+"! Your node is up and running.":e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),t.xp6(1),t.Q6J("rowHeight",e.operatorCardHeight),t.xp6(1),t.Q6J("ngForOf",e.operatorCards)}}function gi(n,a){if(1&n&&(t.TgZ(0,"button",26),t.TgZ(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA(),t.qZA()),2&n){t.oxw();const e=t.MAs(9);t.Q6J("matMenuTriggerFor",e)}}function fi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-card-header"),t.TgZ(1,"mat-card-title",10),t.TgZ(2,"div"),t._UZ(3,"fa-icon",11),t.TgZ(4,"span"),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.YNc(7,gi,3,1,"button",12),t.TgZ(8,"mat-menu",13,41),t.TgZ(10,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(2).onNavigateTo(o.link)}),t._uU(11),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.link),t.xp6(4),t.hij("Go To ",e.goTo,"")}}function _i(n,a){1&n&&t._UZ(0,"mat-progress-bar",27)}function Ci(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",42),2&n){const e=t.oxw(3);t.Q6J("information",e.information)}}function xi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",29),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function yi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",43),2&n){const e=t.oxw(3);t.Q6J("direction","In")("totalLiquidity",e.totalInboundLiquidity)("allChannels",e.allInboundChannels)("errorMessage",e.errorMessages[2])}}function Zi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",43),2&n){const e=t.oxw(3);t.Q6J("direction","Out")("totalLiquidity",e.totalOutboundLiquidity)("allChannels",e.allOutboundChannels)("errorMessage",e.errorMessages[2])}}function Ti(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",52),t.TgZ(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA(),t.qZA(),t.TgZ(3,"mat-menu",13,53),t.TgZ(5,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2).$implicit;return t.oxw(2).onNavigateTo(o.link)}),t._uU(6),t.qZA(),t.TgZ(7,"button",15),t.NdJ("click",function(){return t.CHM(e),t.oxw(4).onNavigateTo("/ecl/reports/transactions")}),t._uU(8,"Transactions Summary"),t.qZA(),t.qZA()}if(2&n){const e=t.MAs(4),i=t.oxw(2).$implicit;t.Q6J("matMenuTriggerFor",e),t.xp6(6),t.hij("Go To ",i.goTo,"")}}function Ai(n,a){1&n&&(t.TgZ(0,"span",44),t.TgZ(1,"mat-tab-group",45),t.TgZ(2,"mat-tab",46),t._UZ(3,"rtl-ecl-lightning-invoices",47),t.qZA(),t.TgZ(4,"mat-tab",48),t._UZ(5,"rtl-ecl-lightning-payments",49),t.qZA(),t.TgZ(6,"mat-tab",50),t.YNc(7,Ti,9,2,"ng-template",51),t.qZA(),t.qZA(),t.qZA()),2&n&&(t.xp6(3),t.Q6J("calledFrom","home"),t.xp6(2),t.Q6J("calledFrom","home"),t.xp6(1),t.Q6J("disabled",!0))}function Li(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const vi=function(n){return{"p-0":n}};function bi(n,a){if(1&n&&(t.TgZ(0,"mat-grid-tile",8),t.TgZ(1,"mat-card",35),t.YNc(2,fi,12,4,"mat-card-header",36),t.TgZ(3,"mat-card-content",37),t.YNc(4,_i,1,0,"mat-progress-bar",18),t.TgZ(5,"div",19),t.YNc(6,Ci,1,1,"rtl-ecl-node-info",38),t.YNc(7,xi,1,2,"rtl-ecl-balances-info",21),t.YNc(8,yi,1,4,"rtl-ecl-channel-liquidity-info",39),t.YNc(9,Zi,1,4,"rtl-ecl-channel-liquidity-info",39),t.YNc(10,Ai,8,3,"span",40),t.YNc(11,Li,2,0,"h3",25),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(1),t.Q6J("ngClass",t.VKq(13,vi,"transactions"===e.id)),t.xp6(1),t.Q6J("ngIf","transactions"!==e.id),t.xp6(1),t.s9C("fxFlex","transactions"===e.id?100:"balance"===e.id?70:90),t.Q6J("ngClass",t.VKq(15,ft,"node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.ERROR)||("inboundLiq"===e.id||"outboundLiq"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR)),t.xp6(1),t.Q6J("ngIf","node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.INITIATED)||("inboundLiq"===e.id||"outboundLiq"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","inboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","outboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","transactions")}}function Si(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",4),t.TgZ(2,"span",5),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"mat-grid-list",34),t.YNc(5,bi,12,17,"mat-grid-tile",7),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faSmile),t.xp6(2),t.hij("Welcome ",e.information.alias,"! Your node is up and running."),t.xp6(1),t.Q6J("rowHeight",e.merchantCardHeight),t.xp6(1),t.Q6J("ngForOf",e.merchantCards)}}let wi=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.commonService=o,this.router=s,this.faSmile=ct.I3,this.faFrown=ct.Kf,this.faAngleDoubleDown=Z.Sbq,this.faAngleDoubleUp=Z.Vfw,this.faChartPie=Z.OS1,this.faBolt=Z.BDt,this.faServer=Z.xf3,this.faNetworkWired=Z.kXW,this.userPersonaEnum=l.ol,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.errorMessages=["","","",""],this.apiCallStatusNodeInfo={status:l.Bn.COMPLETED},this.apiCallStatusFees={status:l.Bn.COMPLETED},this.apiCallStatusOCBal={status:l.Bn.COMPLETED},this.apiCallStatusAllChannels={status:l.Bn.COMPLETED},this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.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===l.cu.SM||this.screenSize===l.cu.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(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.T$).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=e.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.information=e.information}),this.store.select(_.JG).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessages[1]="",this.apiCallStatusFees=e.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=e.fees}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[3]),(0,tt.M)(this.store.select(_.kY))).subscribe(([e,i])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusAllChannels=e.apiCallStatus,this.apiCallStatusOCBal=i.apiCallStatus,this.apiCallStatusAllChannels.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusAllChannels.message?JSON.stringify(this.apiCallStatusAllChannels.message):this.apiCallStatusAllChannels.message),this.apiCallStatusOCBal.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusOCBal.message?JSON.stringify(this.apiCallStatusOCBal.message):this.apiCallStatusOCBal.message),this.channels=e.activeChannels,this.onchainBalance=i.onchainBalance,this.balances.onchain=this.onchainBalance.total,this.balances.lightning=e.lightningBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const o=e.lightningBalance.localBalance?+e.lightningBalance.localBalance:0,s=e.lightningBalance.remoteBalance?+e.lightningBalance.remoteBalance:0;this.channelBalances={localBalance:o,remoteBalance:s,balancedness:+(1-Math.abs((o-s)/(o+s))).toFixed(3)},this.channelsStatus=e.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(f=>f.toRemote>0),"toRemote"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(f=>f.toLocal>0),"toLocal"))),this.channels.forEach(f=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(f.toRemote),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(f.toLocal)}),this.logger.info(e)})}onNavigateTo(e){this.router.navigateByUrl(e)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.channels.sort((e,i)=>{const o=+e.toLocal+ +e.toRemote,s=+i.toLocal+ +i.toRemote;return o>s?-1:o{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(F.v),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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",3,"fxFlex","ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"balances","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"balances","errorMessage"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["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",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage"],["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(e,i){if(1&e&&(t.YNc(0,hi,7,4,"div",0),t.YNc(1,Si,6,4,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,I.BN,ut.Il,u.sg,ut.DX,A.a8,p.yH,A.dk,A.n5,et.VK,et.OP,A.dn,u.mk,S.oO,u.RF,u.n9,u.ED,q.lW,et.p6,pt.Hw,M.pW,Jt,Ht,$t,jt,ne,he,N.SP,N.uX,dt,gt,N.uD],styles:[""]}),n})();var Ei=g(4084);const qi=["form"];function Ii(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Bitcoin address is required."),t.qZA())}function Fi(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.amountError)}}function Oi(n,a){if(1&n&&(t.TgZ(0,"mat-option",29),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e)}}function Ri(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Target Confirmation Blocks is required."),t.qZA())}function Ni(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.sendFundError)}}function ki(n,a){if(1&n&&(t.TgZ(0,"div",30),t._UZ(1,"fa-icon",31),t.YNc(2,Ni,2,1,"span",12),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.sendFundError)}}let _t=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.logger=i,this.store=o,this.commonService=s,this.decimalPipe=c,this.actions=f,this.faExclamationTriangle=Z.eHv,this.selNode={},this.addressTypes=[],this.selectedAddress=l._t[1],this.blockchainBalance={},this.information={},this.newAddress="",this.transaction={},this.sendFundError="",this.fiatConversion=!1,this.amountUnits=l.uA,this.selAmountUnit=l.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=l.Xz,this.amountError="Amount is Required.",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(Ei.dT).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.fiatConversion=e.settings.fiatConversion,this.amountUnits=e.settings.currencyUnits,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL)).subscribe(e=>{e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL&&(this.store.dispatch((0,v.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"SendOnchainFunds"===e.payload.action&&(this.sendFundError=e.payload.message)})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.transaction.amount&&this.selAmountUnit!==l.NT.SATS?this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit,l.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:e=>{this.transaction.amount=parseInt(e[l.NT.SATS]),this.selAmountUnit=l.NT.SATS,this.store.dispatch((0,O.Iy)({payload:this.transaction}))},error:e=>{this.transaction.amount=null,this.selAmountUnit=l.NT.SATS,this.amountError="Conversion Error: "+e}}):this.store.dispatch((0,O.Iy)({payload: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(e){const i=this,o=this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit;let s=e.value===this.amountUnits[2]?l.NT.OTHER:e.value;this.transaction.amount&&this.selAmountUnit!==e.value&&this.commonService.convertCurrency(this.transaction.amount,o,s,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:c=>{this.selAmountUnit=e.value,i.transaction.amount=+i.decimalPipe.transform(c[s],i.currencyUnitFormats[s]).replace(/,/g,"")},error:c=>{i.transaction.amount=null,this.amountError="Conversion Error: "+c,this.selAmountUnit=o,s=o}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(R.mQ),t.Y36(b.yh),t.Y36(F.v),t.Y36(u.JJ),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-send-modal"]],viewQuery:function(e,i){if(1&e&&t.Gf(qi,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:36,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"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-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Send Payment"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.NdJ("submit",function(){return i.onSendFunds()})("reset",function(){return i.resetData()}),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"input",10,11),t.NdJ("ngModelChange",function(s){return i.transaction.address=s}),t.qZA(),t.YNc(14,Ii,2,0,"mat-error",12),t.qZA(),t.TgZ(15,"mat-form-field",13),t.TgZ(16,"input",14,15),t.NdJ("ngModelChange",function(s){return i.transaction.amount=s}),t.qZA(),t.TgZ(18,"span",16),t._uU(19),t.qZA(),t.YNc(20,Fi,2,1,"mat-error",12),t.qZA(),t.TgZ(21,"mat-form-field",17),t.TgZ(22,"mat-select",18),t.NdJ("selectionChange",function(s){return i.onAmountUnitChange(s)}),t.YNc(23,Oi,2,2,"mat-option",19),t.qZA(),t.qZA(),t.TgZ(24,"div",20),t.TgZ(25,"mat-form-field",21),t.TgZ(26,"input",22,23),t.NdJ("ngModelChange",function(s){return i.transaction.blocks=s}),t.qZA(),t.YNc(28,Ri,2,0,"mat-error",12),t.qZA(),t.qZA(),t._UZ(29,"div",24),t.YNc(30,ki,3,2,"div",25),t.TgZ(31,"div",26),t.TgZ(32,"button",27),t._uU(33,"Clear Fields"),t.qZA(),t.TgZ(34,"button",28),t._uU(35,"Send Funds"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.transaction.address),t.xp6(2),t.Q6J("ngIf",!i.transaction.address),t.xp6(2),t.Q6J("ngModel",i.transaction.amount)("step",100)("min",0),t.xp6(3),t.hij(" ",i.selAmountUnit," "),t.xp6(1),t.Q6J("ngIf",!i.transaction.amount),t.xp6(2),t.Q6J("value",i.selAmountUnit),t.xp6(1),t.Q6J("ngForOf",i.amountUnits),t.xp6(3),t.Q6J("ngModel",i.transaction.blocks)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",!i.transaction.blocks),t.xp6(2),t.Q6J("ngIf",""!==i.sendFundError))},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,D.ZT,A.dn,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,m.wV,m.qQ,$.q,x.R9,k.gD,u.sg,x.TO,Q.ey,I.BN],styles:[""]}),n})();var at=g(2737);function Pi(n,a){1&n&&t._UZ(0,"mat-progress-bar",31)}function Di(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Date/Time "),t.qZA())}function Ui(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.timestamp,"dd/MMM/YYYY HH:mm"))}}function Mi(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Amount (Sats) "),t.qZA())}function Ji(n,a){if(1&n&&(t.TgZ(0,"span",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.amount))}}function Yi(n,a){if(1&n&&(t.TgZ(0,"span",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("(",t.lcZ(2,1,-1*e.amount),")")}}function Qi(n,a){if(1&n&&(t.TgZ(0,"td",33),t.YNc(1,Ji,3,3,"span",35),t.YNc(2,Yi,3,3,"span",36),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e.amount>0||0===e.amount),t.xp6(1),t.Q6J("ngIf",e.amount<0)}}function Hi(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Fees (Sats) "),t.qZA())}function Bi(n,a){if(1&n&&(t.TgZ(0,"td",33),t.TgZ(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.fees))}}function zi(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Confirmations "),t.qZA())}function Vi(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,1,null==e?null:e.confirmations)," ")}}function Gi(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Address "),t.qZA())}function Xi(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e.address)}}function $i(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",41),t.TgZ(1,"div",42),t.TgZ(2,"mat-select",43),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",44),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Wi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",45),t.TgZ(1,"button",46),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onTransactionClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function Ki(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No transaction available."),t.qZA())}function ji(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting transactions..."),t.qZA())}function ta(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function ea(n,a){if(1&n&&(t.TgZ(0,"td",47),t.YNc(1,Ki,2,0,"p",48),t.YNc(2,ji,2,0,"p",48),t.YNc(3,ta,2,1,"p",48),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const na=function(n){return{"display-none":n}};function ia(n,a){if(1&n&&t._UZ(0,"tr",49),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,na,(null==e.listTransactions?null:e.listTransactions.data)&&(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)>0))}}function aa(n,a){1&n&&t._UZ(0,"tr",50)}function oa(n,a){1&n&&t._UZ(0,"tr",51)}const sa=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},la=function(){return["no_transaction"]};let ra=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.faHistory=Z.qO$,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unsub=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","confirmations","fees","actions"]):this.screenSize===l.cu.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((0,O.mC)()),this.store.select(_.dx).pipe((0,h.R)(this.unsub[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),e.transactions&&this.loadTransactionsTable(e.transactions),this.logger.info(e)})}applyFilter(){this.listTransactions.filter=this.selFilter.trim().toLowerCase()}onTransactionClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"blockHash",value:e.blockHash,title:"Block Hash",width:100}],[{key:"txid",value:e.txid,title:"Transaction ID",width:100}],[{key:"timestamp",value:e.timestamp,title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"confirmations",value:e.confirmations,title:"Number of Confirmations",width:50,type:l.Gi.NUMBER}],[{key:"fees",value:e.fees,title:"Fees (Sats)",width:50,type:l.Gi.NUMBER},{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"address",value:e.address,title:"Address",width:100,type:l.Gi.STRING}]]}}}))}loadTransactionsTable(e){this.listTransactions=new r.by([...e]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.listTransactions.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.listTransactions.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-transaction-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Transactions")}])],decls:37,vars:15,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",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","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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"div",2),t._UZ(3,"fa-icon",3),t.TgZ(4,"span",4),t._uU(5,"Transaction History"),t.qZA(),t.qZA(),t.TgZ(6,"mat-form-field",5),t.TgZ(7,"input",6),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",7),t.TgZ(9,"div",8),t.YNc(10,Pi,1,0,"mat-progress-bar",9),t.TgZ(11,"table",10,11),t.ynx(13,12),t.YNc(14,Di,2,0,"th",13),t.YNc(15,Ui,3,4,"td",14),t.BQk(),t.ynx(16,15),t.YNc(17,Mi,2,0,"th",16),t.YNc(18,Qi,3,2,"td",14),t.BQk(),t.ynx(19,17),t.YNc(20,Hi,2,0,"th",16),t.YNc(21,Bi,4,3,"td",14),t.BQk(),t.ynx(22,18),t.YNc(23,zi,2,0,"th",19),t.YNc(24,Vi,4,3,"td",20),t.BQk(),t.ynx(25,21),t.YNc(26,Gi,2,0,"th",13),t.YNc(27,Xi,2,1,"td",14),t.BQk(),t.ynx(28,22),t.YNc(29,$i,6,0,"th",23),t.YNc(30,Wi,3,0,"td",24),t.BQk(),t.ynx(31,25),t.YNc(32,ea,4,3,"td",26),t.BQk(),t.YNc(33,ia,1,3,"tr",27),t.YNc(34,aa,1,0,"tr",28),t.YNc(35,oa,1,0,"tr",29),t.qZA(),t._UZ(36,"mat-paginator",30),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Q6J("icon",i.faHistory),t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(3),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.listTransactions)("ngClass",t.VKq(12,sa,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,la)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,I.BN,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,k.gD,k.$L,Q.ey,q.lW,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function ca(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let ua=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.selNode={},this.faExchangeAlt=Z.Ssp,this.faChartPie=Z.OS1,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 d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}),this.store.select(_.LR).pipe((0,h.R)(this.unSubs[1])).subscribe(i=>{this.selNode=i}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(i=>{this.balances=[{title:"Total Balance",dataValue:i.onchainBalance.total||0},{title:"Confirmed",dataValue:i.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:i.onchainBalance.unconfirmed}]})}openSendFundsModal(){this.store.dispatch((0,v.qR)({payload:{data:{component:_t}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"On-chain Transactions"),t.qZA(),t.qZA(),t.TgZ(12,"div",6),t.TgZ(13,"mat-card"),t.TgZ(14,"mat-card-content",4),t.TgZ(15,"nav",7),t.YNc(16,ca,2,3,"div",8),t.qZA(),t.TgZ(17,"div",9),t._UZ(18,"router-outlet"),t.qZA(),t.TgZ(19,"div",10),t._UZ(20,"rtl-ecl-on-chain-transaction-history",11),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,at.D,N.BU,u.sg,p.yH,y.lC,ra,N.Nj,y.rH],styles:[""]}),n})();var Ct=g(4377);function pa(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Channels"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activeChannels)}}function ma(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Peers"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activePeers)}}let da=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.activePeers=0,this.activeChannels=0,this.faUsers=Z.FVb,this.faChartPie=Z.OS1,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 d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof y.Av)).subscribe(e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activePeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.activeChannels=e.channelsStatus&&e.channelsStatus.active&&e.channelsStatus.active.channels?e.channelsStatus.active.channels:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.balances=[{title:"Total Balance",dataValue:e.onchainBalance.total||0},{title:"Confirmed",dataValue:e.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:e.onchainBalance.unconfirmed}]})}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Connections"),t.qZA(),t.qZA(),t.TgZ(12,"div",6),t.TgZ(13,"mat-card"),t.TgZ(14,"mat-card-content",4),t.TgZ(15,"mat-tab-group",7),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(16,"mat-tab"),t.YNc(17,pa,2,1,"ng-template",8),t.qZA(),t.TgZ(18,"mat-tab"),t.YNc(19,ma,2,1,"ng-template",8),t.qZA(),t.qZA(),t.TgZ(20,"div",9),t._UZ(21,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faUsers),t.xp6(6),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,at.D,N.SP,N.uX,N.uD,p.yH,y.lC,Ct.k],styles:[""]}),n})();function ha(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let ga=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,this.faExchangeAlt=Z.Ssp,this.faChartPie=Z.OS1,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"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[1]),(0,tt.M)(this.store.select(_.LR))).subscribe(([i,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===l.ol.OPERATOR?[{title:"Local Capacity",dataValue:i.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:i.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:i.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:i.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(i)})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Lightning Balance"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",6),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Lightning Transactions"),t.qZA(),t.qZA(),t.TgZ(12,"div",7),t.TgZ(13,"mat-card"),t.TgZ(14,"mat-card-content",4),t.TgZ(15,"nav",8),t.YNc(16,ha,2,3,"div",9),t.qZA(),t.TgZ(17,"div",10),t._UZ(18,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,at.D,N.BU,u.sg,p.yH,y.lC,N.Nj,y.rH],styles:[""]}),n})();function fa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let _a=(()=>{class n{constructor(e){this.router=e,this.faMapSigns=Z.SuH,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 d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"fa-icon",2),t.TgZ(3,"span",3),t._uU(4,"Routing"),t.qZA(),t.qZA(),t.TgZ(5,"div",4),t.TgZ(6,"mat-card",5),t.TgZ(7,"mat-card-content",6),t.TgZ(8,"div",7),t.TgZ(9,"nav",8),t.YNc(10,fa,2,3,"div",9),t.qZA(),t.qZA(),t.TgZ(11,"div",10),t._UZ(12,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(2),t.Q6J("icon",i.faMapSigns),t.xp6(8),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,p.yH,A.a8,A.dn,N.BU,u.sg,y.lC,N.Nj,y.rH],styles:[""]}),n})();var xt=g(9859),yt=g(9966),Zt=g(1979);function Ca(n,a){if(1&n&&(t.TgZ(0,"span",9),t.TgZ(1,"div"),t._uU(2),t.ALo(3,"titlecase"),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.AsE("",i.nodeFeaturesEnum[e.key]||e.key,": ",t.lcZ(3,2,e.value),"")}}function xa(n,a){1&n&&(t.TgZ(0,"th",24),t._uU(1,"Address"),t.qZA())}function ya(n,a){if(1&n&&(t.TgZ(0,"td",25),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",e," ")}}function Za(n,a){1&n&&(t.TgZ(0,"th",26),t.TgZ(1,"span",27),t._uU(2,"Actions"),t.qZA(),t.qZA())}function Ta(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",28),t.TgZ(1,"span",27),t.TgZ(2,"button",29),t.NdJ("copied",function(o){return t.CHM(e),t.oxw(2).onCopyNodeURI(o)}),t._uU(3,"Copy Node URI"),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("payload",(null==i.lookupResult?null:i.lookupResult.nodeId)+"@"+e)}}function Aa(n,a){1&n&&t._UZ(0,"tr",30)}function La(n,a){1&n&&t._UZ(0,"tr",31)}const va=function(n){return{"background-color":n}};function ba(n,a){if(1&n&&(t.TgZ(0,"div",1),t._UZ(1,"mat-divider",2),t.TgZ(2,"div",3),t.TgZ(3,"div",4),t.TgZ(4,"h4",5),t._uU(5,"Alias"),t.qZA(),t.TgZ(6,"span",6),t._uU(7),t.TgZ(8,"span",7),t._uU(9),t.qZA(),t.qZA(),t.qZA(),t.TgZ(10,"div",8),t.TgZ(11,"h4",5),t._uU(12,"Pub Key"),t.qZA(),t.TgZ(13,"span",9),t._uU(14),t.qZA(),t.qZA(),t.qZA(),t._UZ(15,"mat-divider",2),t.TgZ(16,"div",3),t.TgZ(17,"div",4),t.TgZ(18,"h4",5),t._uU(19,"Date/Time"),t.qZA(),t.TgZ(20,"span",6),t._uU(21),t.ALo(22,"date"),t.qZA(),t.qZA(),t.TgZ(23,"div",8),t.TgZ(24,"h4",5),t._uU(25,"Features"),t.qZA(),t.YNc(26,Ca,4,4,"span",10),t.ALo(27,"keyvalue"),t.qZA(),t.qZA(),t._UZ(28,"mat-divider",2),t.TgZ(29,"div",3),t.TgZ(30,"div",11),t.TgZ(31,"h4",5),t._uU(32,"Signature"),t.qZA(),t.TgZ(33,"span",6),t._uU(34),t.qZA(),t.qZA(),t.qZA(),t._UZ(35,"mat-divider",2),t.TgZ(36,"div",1),t.TgZ(37,"h4",12),t._uU(38,"Addresses"),t.qZA(),t.TgZ(39,"div",13),t.TgZ(40,"table",14,15),t.ynx(42,16),t.YNc(43,xa,2,0,"th",17),t.YNc(44,ya,2,1,"td",18),t.BQk(),t.ynx(45,19),t.YNc(46,Za,3,0,"th",20),t.YNc(47,Ta,4,1,"td",21),t.BQk(),t.YNc(48,Aa,1,0,"tr",22),t.YNc(49,La,1,0,"tr",23),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.alias),t.xp6(1),t.Q6J("ngStyle",t.VKq(19,va,null==e.lookupResult?null:e.lookupResult.rgbColor)),t.xp6(1),t.Oqu(null!=e.lookupResult&&e.lookupResult.rgbColor?null==e.lookupResult?null:e.lookupResult.rgbColor:""),t.xp6(5),t.Oqu(null==e.lookupResult?null:e.lookupResult.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.xi3(22,14,1e3*(null==e.lookupResult?null:e.lookupResult.timestamp),"dd/MMM/YYYY HH:mm")),t.xp6(5),t.Q6J("ngForOf",t.lcZ(27,17,null==e.lookupResult?null:e.lookupResult.features.activated)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.signature),t.xp6(1),t.Q6J("inset",!0),t.xp6(5),t.Q6J("dataSource",e.addresses),t.xp6(8),t.Q6J("matHeaderRowDef",e.displayedColumns),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}let Sa=(()=>{class n{constructor(e,i){this.logger=e,this.snackBar=i,this.lookupResult={},this.displayedColumns=["address","actions"],this.nodeFeaturesEnum=l.H_}ngOnInit(){this.addresses=new r.by(this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null}onCopyNodeURI(e){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(yt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-lookup"]],viewQuery:function(e,i){if(1&e&&t.Gf(T.YE,5),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column",4,"ngIf"],["fxLayout","column"],[1,"my-1",3,"inset"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"ml-2",3,"ngStyle"],["fxFlex","70"],[1,"foreground-secondary-text","w-100"],["class","foreground-secondary-text w-100",4,"ngFor","ngForOf"],["fxFlex","100"],["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(e,i){1&e&&t.YNc(0,ba,50,21,"div",0),2&e&&t.Q6J("ngIf",i.lookupResult)},directives:[u.O5,p.xw,G.d,p.yH,p.Wh,u.PC,S.Zl,u.sg,Y.$V,r.BZ,T.YE,r.w1,r.fO,r.Dz,r.as,r.nj,r.ge,T.nU,r.ev,q.lW,Zt.y,r.XQ,r.Gk],pipes:[u.uU,u.Nd,u.rS],styles:[""]}),n})();const wa=["form"];function Ea(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder," is required.")}}function qa(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Invalid ",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder,".")}}function Ia(n,a){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"rtl-ecl-node-lookup",25),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("lookupResult",e.nodeLookupValue)}}function Fa(n,a){if(1&n&&(t.TgZ(0,"span",23),t.YNc(1,Ia,2,1,"div",24),t.qZA()),2&n){const e=t.oxw(2),i=t.MAs(21);t.xp6(1),t.Q6J("ngIf",e.nodeLookupValue.nodeId)("ngIfElse",i)}}function Oa(n,a){1&n&&(t.TgZ(0,"span",23),t.TgZ(1,"h3"),t._uU(2,"Error! Unable to find details!"),t.qZA(),t.qZA())}function Ra(n,a){if(1&n&&(t.TgZ(0,"div",17),t.TgZ(1,"div",18),t.TgZ(2,"span",19),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"div",20),t.YNc(5,Fa,2,2,"span",21),t.YNc(6,Oa,3,0,"span",22),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(3),t.hij("",e.lookupFields[e.selectedFieldId].name," Details"),t.xp6(1),t.Q6J("ngSwitch",e.selectedFieldId),t.xp6(1),t.Q6J("ngSwitchCase",0)}}function Na(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find details!"),t.qZA())}const ka=function(n){return{"mt-1":!0,"mt-2":n}};let Pa=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.actions=s,this.lookupKeyCtrl=new m.NI,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=Z.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{if(e.type===l.lr.SET_LOOKUP_ECL){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue=JSON.parse(JSON.stringify(e.payload[0]))||{nodeid:""};break;case 1:this.channelLookupValue=JSON.parse(JSON.stringify(e.payload))||[]}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"Lookup"===e.payload.action&&(this.flgLoading[0]="error")}),this.lookupKeyCtrl.valueChanges.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1})}onLookup(){return this.lookupKeyCtrl.value?this.lookupKeyCtrl.value&&(this.lookupKeyCtrl.value.includes("@")||this.lookupKeyCtrl.value.includes(","))?(this.lookupKeyCtrl.setErrors({invalid:!0}),!0):void(0===(this.selectedFieldId||(this.selectedFieldId=0),this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.selectedFieldId)&&this.store.dispatch((0,O.Sf)({payload:this.lookupKeyCtrl.value.trim()}))):(this.lookupKeyCtrl.setErrors({required:!0}),!0)}onSelectChange(e){this.resetData(),this.selectedFieldId=e.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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lookups"]],viewQuery:function(e,i){if(1&e&&t.Gf(wa,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:22,vars:9,consts:[["fxLayout","column"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField"],["checked","",1,"mr-4",3,"value"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"formControl","placeholder"],["key",""],[4,"ngIf"],["fxLayout","row","fxFlex","100",1,"mt-1"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-content",2),t.TgZ(3,"form",3,4),t.TgZ(5,"div",5),t.TgZ(6,"mat-radio-group",6),t.TgZ(7,"mat-radio-button",7),t._uU(8,"Node"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(9,"mat-form-field",8),t._UZ(10,"input",9,10),t.YNc(12,Ea,2,1,"mat-error",11),t.YNc(13,qa,2,1,"mat-error",11),t.qZA(),t.TgZ(14,"div",12),t.TgZ(15,"button",13),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",14),t.NdJ("click",function(){return i.onLookup()}),t._uU(18,"Lookup"),t.qZA(),t.qZA(),t.qZA(),t.YNc(19,Ra,7,3,"div",15),t.qZA(),t.qZA(),t.qZA(),t.YNc(20,Na,2,0,"ng-template",null,16,t.W1O)),2&e&&(t.xp6(7),t.Q6J("value",0),t.xp6(2),t.Q6J("ngClass",t.VKq(7,ka,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM)),t.xp6(1),t.Q6J("formControl",i.lookupKeyCtrl)("placeholder",(null==i.lookupFields[i.selectedFieldId]?null:i.lookupFields[i.selectedFieldId].placeholder)||"Lookup Key"),t.xp6(2),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.invalid),t.xp6(6),t.Q6J("ngIf",i.flgSetLookupValue))},directives:[p.xw,p.yH,p.Wh,A.dn,m._Y,m.JL,m.F,xt.VQ,xt.U0,x.KE,u.mk,S.oO,U.Nt,m.Fj,m.Q7,m.JJ,m.oH,u.O5,q.lW,x.TO,u.RF,u.n9,u.ED,Sa],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var Da=g(4240);let Ua=(()=>{class n{constructor(e,i){this.store=e,this.eclEffects=i,this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,O._E)()),this.eclEffects.setNewAddress.pipe((0,H.q)(1)).subscribe(e=>{this.newAddress=e,setTimeout(()=>{this.store.dispatch((0,v.qR)({payload:{data:{address:this.newAddress,addressType:"",component:Da.n}}}))},0)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(it.o))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-receive"]],decls:4,vars:0,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"button",2),t.NdJ("click",function(){return i.onGenerateAddress()}),t._uU(3,"Generate Address"),t.qZA(),t.qZA(),t.qZA())},directives:[p.xw,p.yH,p.Wh,q.lW],styles:[""]}),n})(),Ma=(()=>{class n{constructor(e,i){this.store=e,this.activatedRoute=i,this.sweepAll=!1,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activatedRoute.data.pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.sweepAll=e.sweepAll})}openSendFundsModal(){this.store.dispatch((0,v.qR)({payload:{data:{sweepAll:this.sweepAll,component:_t}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(y.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"button",2),t.NdJ("click",function(){return i.openSendFundsModal()}),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Oqu(i.sweepAll?"Sweep All":"Send Funds"))},directives:[p.xw,p.yH,p.Wh,q.lW],styles:[""]}),n})();var Ja=g(579),Tt=g(2201),Ya=g(4085),At=g(9511),Lt=g(9851);const Qa=["form"];function Ha(n,a){if(1&n&&(t.TgZ(0,"mat-option",34),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e.alias?e.alias:e.nodeId?e.nodeId:"")}}function Ba(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer alias is required."),t.qZA())}function za(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer not found in the list."),t.qZA())}function Va(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1),t.TgZ(1,"input",30),t.NdJ("change",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.qZA(),t.TgZ(2,"mat-autocomplete",31,32),t.NdJ("optionSelected",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.YNc(4,Ha,2,2,"mat-option",33),t.ALo(5,"async"),t.qZA(),t.YNc(6,Ba,2,0,"mat-error",17),t.YNc(7,za,2,0,"mat-error",17),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("formControl",i.selectedPeer)("matAutocomplete",e),t.xp6(1),t.Q6J("displayWith",i.displayFn),t.xp6(2),t.Q6J("ngForOf",t.lcZ(5,6,i.filteredPeers)),t.xp6(2),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.notfound)}}function Ga(n,a){1&n&&t.GkF(0)}function Xa(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function $a(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function Wa(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.channelConnectionError)}}function Ka(n,a){if(1&n&&(t.TgZ(0,"div",35),t._UZ(1,"fa-icon",36),t.YNc(2,Wa,2,1,"span",17),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.channelConnectionError)}}function ja(n,a){if(1&n&&(t.TgZ(0,"mat-expansion-panel",38),t.TgZ(1,"mat-expansion-panel-header"),t.TgZ(2,"mat-panel-title"),t.TgZ(3,"span"),t._uU(4,"Peer: \xa0"),t.qZA(),t.TgZ(5,"strong",39),t._uU(6),t.qZA(),t.qZA(),t.qZA(),t.TgZ(7,"div",9),t.TgZ(8,"div",0),t.TgZ(9,"div",1),t.TgZ(10,"h4",40),t._uU(11,"Pubkey"),t.qZA(),t.TgZ(12,"span",41),t._uU(13),t.qZA(),t.qZA(),t.qZA(),t._UZ(14,"mat-divider",42),t.TgZ(15,"div",0),t.TgZ(16,"div",43),t.TgZ(17,"h4",40),t._uU(18,"Address"),t.qZA(),t.TgZ(19,"span",44),t._uU(20),t.qZA(),t.qZA(),t.TgZ(21,"div",43),t.TgZ(22,"h4",40),t._uU(23,"State"),t.qZA(),t.TgZ(24,"span",44),t._uU(25),t.ALo(26,"titlecase"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw(2);t.xp6(6),t.Oqu((null==e.peer?null:e.peer.alias)||(null==e.peer?null:e.peer.nodeId)),t.xp6(7),t.Oqu(e.peer.nodeId),t.xp6(7),t.Oqu(null==e.peer?null:e.peer.address),t.xp6(5),t.Oqu(t.lcZ(26,4,null==e.peer?null:e.peer.state))}}function to(n,a){if(1&n&&t.YNc(0,ja,27,6,"mat-expansion-panel",37),2&n){const e=t.oxw();t.Q6J("ngIf",e.peer)}}let vt=(()=>{class n{constructor(e,i,o,s){this.dialogRef=e,this.data=i,this.store=o,this.actions=s,this.selectedPeer=new m.NI,this.faExclamationTriangle=Z.eHv,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.feeRate=null,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(o=>o.type===l.lr.UPDATE_API_CALL_STATUS_ECL||o.type===l.lr.FETCH_CHANNELS_ECL)).subscribe(o=>{o.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&o.payload.status===l.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===l.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close()});let e="",i="";this.sortedPeers=this.peers.sort((o,s)=>(e=o.alias?o.alias.toLowerCase():o.nodeId?o.nodeId.toLowerCase():"",i=s.alias?s.alias.toLowerCase():o.nodeId.toLowerCase(),ei?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,h.R)(this.unSubs[1]),(0,Ja.O)(""),(0,Tt.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.nodeId),(0,Tt.U)(o=>o?this.filterPeers(o):this.sortedPeers.slice()))}filterPeers(e){return this.sortedPeers.filter(i=>0===i.alias.toLowerCase().indexOf(e?e.toLowerCase():""))}displayFn(e){return e&&e.alias?e.alias:e&&e.nodeId?e.nodeId:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.nodeId?this.selectedPeer.value.nodeId:null,"string"==typeof this.selectedPeer.value){const e=this.peers.filter(i=>i.alias.length===this.selectedPeer.value.length&&0===i.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===e.length&&e[0].nodeId&&(this.selectedPubkey=e[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(e){this.advancedTitle=e&&this.feeRate&&this.feeRate>0?"Advanced Options | Fee (Sats/vByte): "+this.feeRate:"Advanced Options"}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0)return!0;this.store.dispatch((0,O.YX)({payload:{nodeId:this.peer&&this.peer.nodeId?this.peer.nodeId:this.selectedPubkey,amount:this.fundingAmount,private:this.isPrivate,feeRate:this.feeRate}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(b.yh),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-open-channel"]],viewQuery:function(e,i){if(1&e&&t.Gf(Qa,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:48,vars:18,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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"],["matInput","","placeholder","Fee (Sats/vByte)","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-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-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(e,i){if(1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.NdJ("submit",function(){return i.onOpenChannel()})("reset",function(){return i.resetData()}),t.TgZ(11,"div",9),t.YNc(12,Va,8,8,"mat-form-field",10),t.qZA(),t.YNc(13,Ga,1,0,"ng-container",11),t.TgZ(14,"div",9),t.TgZ(15,"div",12),t.TgZ(16,"mat-form-field",13),t.TgZ(17,"input",14,15),t.NdJ("ngModelChange",function(s){return i.fundingAmount=s}),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"span",16),t._uU(23," Sats "),t.qZA(),t.YNc(24,Xa,2,0,"mat-error",17),t.YNc(25,$a,2,1,"mat-error",17),t.qZA(),t.TgZ(26,"div",18),t.TgZ(27,"mat-slide-toggle",19),t.NdJ("ngModelChange",function(s){return i.isPrivate=s}),t._uU(28,"Private Channel"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(29,"mat-expansion-panel",20),t.NdJ("closed",function(){return i.onAdvancedPanelToggle(!0)})("opened",function(){return i.onAdvancedPanelToggle(!1)}),t.TgZ(30,"mat-expansion-panel-header"),t.TgZ(31,"mat-panel-title"),t.TgZ(32,"span"),t._uU(33),t.qZA(),t.qZA(),t.qZA(),t.TgZ(34,"div",21),t.TgZ(35,"div",12),t.TgZ(36,"div",22),t.TgZ(37,"mat-form-field",1),t.TgZ(38,"input",23,24),t.NdJ("ngModelChange",function(s){return i.feeRate=s}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(40,Ka,3,2,"div",25),t.TgZ(41,"div",26),t.TgZ(42,"button",27),t._uU(43,"Clear Fields"),t.qZA(),t.TgZ(44,"button",28),t._uU(45,"Open Channel"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(46,to,1,1,"ng-template",null,29,t.W1O)),2&e){const o=t.MAs(18),s=t.MAs(47);t.xp6(5),t.Oqu(i.alertTitle),t.xp6(7),t.Q6J("ngIf",!i.peer&&i.peers&&i.peers.length>0),t.xp6(1),t.Q6J("ngTemplateOutlet",s),t.xp6(4),t.Q6J("ngModel",i.fundingAmount)("step",1e3)("min",1)("max",i.totalBalance),t.xp6(3),t.hij("Remaining Bal: ",t.lcZ(21,16,i.totalBalance-(i.fundingAmount?i.fundingAmount:0)),""),t.xp6(4),t.Q6J("ngIf",null==o.errors?null:o.errors.required),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.max),t.xp6(2),t.Q6J("ngModel",i.isPrivate),t.xp6(6),t.Oqu(i.advancedTitle),t.xp6(5),t.Q6J("ngModel",i.feeRate)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",""!==i.channelConnectionError)}},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,A.dn,m._Y,m.JL,m.F,u.O5,u.tP,x.KE,U.Nt,m.wV,m.qQ,m.Fd,m.Fj,$.q,Ya.F,m.Q7,m.JJ,m.On,x.bx,x.R9,At.Rr,V.ib,V.yz,V.yK,X.h,Lt.ZL,m.oH,Lt.XC,u.sg,Q.ey,x.TO,I.BN,G.d],pipes:[u.JJ,u.Ov,u.rS],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();function eo(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Open"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfOpenChannels)}}function no(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Pending"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfPendingChannels)}}function io(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Inactive"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfInactiveChannels)}}let ao=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,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 d.x,new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof y.Av)).subscribe(e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.numOfOpenChannels=e.channelsStatus&&e.channelsStatus.active&&e.channelsStatus.active.channels?e.channelsStatus.active.channels:0,this.numOfPendingChannels=e.channelsStatus&&e.channelsStatus.pending&&e.channelsStatus.pending.channels?e.channelsStatus.pending.channels:0,this.numOfInactiveChannels=e.channelsStatus&&e.channelsStatus.inactive&&e.channelsStatus.inactive.channels?e.channelsStatus.inactive.channels:0,this.logger.info(e)}),this.store.select(_.LR).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.peers=e.peers}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}onOpenChannel(){this.store.dispatch((0,v.qR)({payload:{data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:vt}}}))}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/channels/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channels-tables"]],decls:14,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"button",2),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(3,"Open Channel"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-tab-group",4),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(6,"mat-tab"),t.YNc(7,eo,2,1,"ng-template",5),t.qZA(),t.TgZ(8,"mat-tab"),t.YNc(9,no,2,1,"ng-template",5),t.qZA(),t.TgZ(10,"mat-tab"),t.YNc(11,io,2,1,"ng-template",5),t.qZA(),t.qZA(),t.TgZ(12,"div",6),t._UZ(13,"router-outlet"),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(5),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.yH,p.Wh,q.lW,N.SP,N.uX,N.uD,y.lC,Ct.k],styles:[""]}),n})();function oo(n,a){if(1&n&&(t.TgZ(0,"div",11),t.TgZ(1,"h4",12),t._uU(2,"Short Channel ID"),t.qZA(),t.TgZ(3,"span",13),t._uU(4),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(e.channel.shortChannelId)}}function so(n,a){if(1&n&&(t.TgZ(0,"div",11),t.TgZ(1,"h4",12),t._uU(2,"State"),t.qZA(),t.TgZ(3,"span",15),t._uU(4),t.ALo(5,"titlecase"),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(t.lcZ(5,1,e.channel.state))}}function lo(n,a){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"div",9),t.TgZ(2,"div",11),t.TgZ(3,"h4",12),t._uU(4,"Local Balance (Sats)"),t.qZA(),t.TgZ(5,"span",15),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.TgZ(8,"div",11),t.TgZ(9,"h4",12),t._uU(10,"Remote Balance (Sats)"),t.qZA(),t.TgZ(11,"span",15),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t._UZ(14,"mat-divider",14),t.TgZ(15,"div",9),t.TgZ(16,"div",11),t.TgZ(17,"h4",12),t._uU(18,"Base Fee (mSats)"),t.qZA(),t.TgZ(19,"span",15),t._uU(20),t.ALo(21,"number"),t.qZA(),t.qZA(),t.TgZ(22,"div",11),t.TgZ(23,"h4",12),t._uU(24,"Fee Rate (mili mSats)"),t.qZA(),t.TgZ(25,"span",15),t._uU(26),t.ALo(27,"number"),t.qZA(),t.qZA(),t.qZA(),t._UZ(28,"mat-divider",14),t.qZA()),2&n){const e=t.oxw();t.xp6(6),t.Oqu(t.lcZ(7,6,e.channel.toLocal)),t.xp6(6),t.Oqu(t.lcZ(13,8,e.channel.toRemote)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(21,10,e.channel.feeBaseMsat)),t.xp6(6),t.Oqu(t.lcZ(27,12,e.channel.feeProportionalMillionths)),t.xp6(2),t.Q6J("inset",!0)}}function ro(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Show Advanced"),t.qZA())}function co(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Hide Advanced"),t.qZA())}function uo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){return t.CHM(e),t.oxw().onShowAdvanced()}),t.YNc(1,ro,2,0,"p",22),t.YNc(2,co,2,0,"ng-template",null,23,t.W1O),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("ngIf",!i.showAdvanced)("ngIfElse",e)}}function po(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Short Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.shortChannelId)}}function mo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.channelId)}}const ho=function(n){return{"xs-scroll-y":n}},go=function(n,a){return{"mt-2":n,"mt-1":a}};let ot=(()=>{class n{constructor(e,i,o,s,c){this.dialogRef=e,this.data=i,this.logger=o,this.commonService=s,this.snackBar=c,this.faReceipt=Z.dLy,this.showAdvanced=!1,this.channelsType="open",this.screenSize="",this.screenSizeEnum=l.cu}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(e){this.snackBar.open("open"===this.channelsType?"Short channel ID "+e+" copied.":"Channel ID copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(R.mQ),t.Y36(F.v),t.Y36(yt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-information"]],decls:64,vars:28,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["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"],[1,"padding-gap-x-large",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"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1","class","mr-1",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span",5),t._uU(6,"Channel Information"),t.qZA(),t.qZA(),t.TgZ(7,"button",6),t.NdJ("click",function(){return i.onClose()}),t._uU(8,"X"),t.qZA(),t.qZA(),t.TgZ(9,"mat-card-content",7),t.TgZ(10,"div",8),t.TgZ(11,"div",9),t.YNc(12,oo,5,1,"div",10),t.TgZ(13,"div",11),t.TgZ(14,"h4",12),t._uU(15,"Peer Alias"),t.qZA(),t.TgZ(16,"span",13),t._uU(17),t.qZA(),t.qZA(),t.YNc(18,so,6,3,"div",10),t.qZA(),t._UZ(19,"mat-divider",14),t.TgZ(20,"div",9),t.TgZ(21,"div",1),t.TgZ(22,"h4",12),t._uU(23,"Channel ID"),t.qZA(),t.TgZ(24,"span",13),t._uU(25),t.qZA(),t.qZA(),t.qZA(),t._UZ(26,"mat-divider",14),t.TgZ(27,"div",9),t.TgZ(28,"div",1),t.TgZ(29,"h4",12),t._uU(30,"Peer Public Key"),t.qZA(),t.TgZ(31,"span",13),t._uU(32),t.qZA(),t.qZA(),t.qZA(),t._UZ(33,"mat-divider",14),t.TgZ(34,"div",9),t.TgZ(35,"div",11),t.TgZ(36,"h4",12),t._uU(37,"Private"),t.qZA(),t.TgZ(38,"span",15),t._uU(39),t.qZA(),t.qZA(),t.TgZ(40,"div",11),t.TgZ(41,"h4",12),t._uU(42,"Funder"),t.qZA(),t.TgZ(43,"span",15),t._uU(44),t.qZA(),t.qZA(),t.qZA(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9),t.TgZ(47,"div",11),t.TgZ(48,"h4",12),t._uU(49,"State"),t.qZA(),t.TgZ(50,"span",15),t._uU(51),t.ALo(52,"titlecase"),t.qZA(),t.qZA(),t.TgZ(53,"div",11),t.TgZ(54,"h4",12),t._uU(55,"Buried"),t.qZA(),t.TgZ(56,"span",15),t._uU(57),t.qZA(),t.qZA(),t.qZA(),t._UZ(58,"mat-divider",14),t.YNc(59,lo,29,14,"div",16),t.TgZ(60,"div",17),t.YNc(61,uo,4,2,"button",18),t.YNc(62,po,2,1,"button",19),t.YNc(63,mo,2,1,"button",20),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(4),t.Q6J("icon",i.faReceipt),t.xp6(5),t.Q6J("ngClass",t.VKq(23,ho,i.screenSize===i.screenSizeEnum.XS)),t.xp6(3),t.Q6J("ngIf","open"===i.channelsType),t.xp6(5),t.Oqu(i.channel.alias),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.channelId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(0===i.channel.channelFlags?"Yes":"No"),t.xp6(5),t.Oqu(i.channel.isFunder?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(52,21,i.channel.state)),t.xp6(6),t.Oqu(i.channel.buried?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(1),t.Q6J("ngIf",i.showAdvanced&&"open"===i.channelsType),t.xp6(1),t.Q6J("ngClass",t.WLB(25,go,!i.showAdvanced,i.showAdvanced)),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType))},directives:[p.xw,p.Wh,p.yH,A.dk,I.BN,q.lW,A.dn,u.mk,S.oO,u.O5,G.d,X.h,Zt.y],pipes:[u.rS,u.JJ],styles:[""]}),n})();function fo(n,a){1&n&&t._UZ(0,"mat-progress-bar",30)}function _o(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Short Channel ID "),t.qZA())}function Co(n,a){if(1&n&&(t.TgZ(0,"span",37),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function xo(n,a){if(1&n&&(t.TgZ(0,"span",39),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const bt=function(n){return{"max-width":n}};function yo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"div",33),t.YNc(2,Co,2,1,"span",34),t.YNc(3,xo,2,1,"span",35),t.TgZ(4,"span",36),t._uU(5),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(4,bt,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(null==e?null:e.shortChannelId)}}function Zo(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Alias "),t.qZA())}function To(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"div",33),t.TgZ(2,"span",36),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,bt,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(2),t.Oqu(e.alias)}}function Ao(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Base Fee (mSats) "),t.qZA())}function Lo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeBaseMsat,"1.0-0")," ")}}function vo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Fee Rate (mili mSats) "),t.qZA())}function bo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeProportionalMillionths,"1.0-0")," ")}}function So(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Local Balance (Sats) "),t.qZA())}function wo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function Eo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Remote Balance (Sats) "),t.qZA())}function qo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Io(n,a){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Balance Score "),t.qZA())}function Fo(n,a){if(1&n&&(t.TgZ(0,"td",43),t.TgZ(1,"div",44),t.TgZ(2,"mat-hint",45),t._uU(3),t.ALo(4,"number"),t.qZA(),t.qZA(),t._UZ(5,"mat-progress-bar",46),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function Oo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",47),t.TgZ(1,"div",48),t.TgZ(2,"mat-select",49),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onChannelUpdate("all")}),t._uU(5,"Update Fee Policy"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(7,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Ro(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",51),t.TgZ(1,"div",52),t.TgZ(2,"mat-select",53),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelUpdate(s)}),t._uU(7,"Update Fee Policy"),t.qZA(),t.TgZ(8,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!1)}),t._uU(9,"Close Channel"),t.qZA(),t.TgZ(10,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(11,"Force Close"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function No(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No peers connected. Add a peer in order to open a channel."),t.qZA())}function ko(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No channel available."),t.qZA())}function Po(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting channels..."),t.qZA())}function Do(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Uo(n,a){if(1&n&&(t.TgZ(0,"td",54),t.YNc(1,No,2,0,"p",55),t.YNc(2,ko,2,0,"p",55),t.YNc(3,Po,2,0,"p",55),t.YNc(4,Do,2,1,"p",55),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.numPeers<1&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",e.numPeers>0&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Mo=function(n){return{"display-none":n}};function Jo(n,a){if(1&n&&t._UZ(0,"tr",56),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Mo,e.numPeers>0&&(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Yo(n,a){1&n&&t._UZ(0,"tr",57)}function Qo(n,a){1&n&&t._UZ(0,"tr",58)}const Ho=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Bo=function(){return["no_peer"]};let zo=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.faEye=Z.Mdf,this.faEyeSlash=Z.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.activeChannels=e.activeChannels,this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable(),this.logger.info(e)}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable()}onChannelUpdate(e){"all"!==e&&"NORMAL"!==e.state||(this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"all"===e?"Update fee policy for all channels":"Update fee policy for Channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:e&&void 0!==e.feeBaseMsat?e.feeBaseMsat:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:e&&void 0!==e.feeProportionalMillionths?e.feeProportionalMillionths:100,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(s=>{if(s){const c=s[0].inputValue,f=s[1].inputValue;let P=null;if(this.commonService.isVersionCompatible(this.information.version,"0.6.2")){let C="";"all"===e?(this.activeChannels.forEach(E=>{C=C+","+E.nodeId}),C=C.substring(1),P={baseFeeMsat:c,feeRate:f,nodeIds:C}):P={baseFeeMsat:c,feeRate:f,nodeId:e.nodeId}}else{let C="";"all"===e?(this.activeChannels.forEach(E=>{C=C+","+E.channelId}),C=C.substring(1),P={baseFeeMsat:c,feeRate:f,channelIds:C}):P={baseFeeMsat:c,feeRate:f,channelId:e.channelId}}this.store.dispatch((0,O.pW)({payload:P}))}}),this.applyFilter())}percentHintFunction(e){return(e/1e4).toString()+"%"}onChannelClose(e,i){this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:i?"Force Close Channel":"Close Channel",titleMessage:i?"Force closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId):"Closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),noBtnText:"Cancel",yesBtnText:i?"Force Close":"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[5])).subscribe(f=>{f&&this.store.dispatch((0,O.BL)({payload:{channelId:e.channelId,force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{channel:e,channelsType:"open",component:ot}}}))}loadChannelsTable(){this.activeChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...this.activeChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(K.V),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-open-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:39,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","shortChannelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","feeBaseMsat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","feeProportionalMillionths"],["matColumnDef","toLocal"],["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-1",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"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3),t.TgZ(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,fo,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,_o,2,0,"th",10),t.YNc(11,yo,6,6,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,Zo,2,0,"th",10),t.YNc(14,To,4,4,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Ao,2,0,"th",14),t.YNc(17,Lo,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,vo,2,0,"th",14),t.YNc(20,bo,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,So,2,0,"th",14),t.YNc(23,wo,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,Eo,2,0,"th",14),t.YNc(26,qo,4,4,"td",11),t.BQk(),t.ynx(27,18),t.YNc(28,Io,2,0,"th",19),t.YNc(29,Fo,6,4,"td",20),t.BQk(),t.ynx(30,21),t.YNc(31,Oo,8,0,"th",22),t.YNc(32,Ro,12,0,"td",23),t.BQk(),t.ynx(33,24),t.YNc(34,Uo,5,4,"td",25),t.BQk(),t.YNc(35,Jo,1,3,"tr",26),t.YNc(36,Yo,1,0,"tr",27),t.YNc(37,Qo,1,0,"tr",28),t.qZA(),t.qZA(),t._UZ(38,"mat-paginator",29),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,Ho,""!==i.errorMessage)),t.xp6(28),t.Q6J("matFooterRowDef",t.DdM(13,Bo)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,z.gM,I.BN,x.bx,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],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%]{padding-left:1rem;flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:2rem;flex:0 0 17%;width:17%}.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 10%;width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 56.25em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset;flex:1 1 20%;width:20%}}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 56.25em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 90%}}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();function Vo(n,a){1&n&&t._UZ(0,"mat-progress-bar",25)}function Go(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," State "),t.qZA())}function Xo(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.state),"")}}function $o(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," Alias "),t.qZA())}function Wo(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.alias)}}function Ko(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Local Balance (Sats) "),t.qZA())}function jo(n,a){if(1&n&&(t.TgZ(0,"td",27),t.TgZ(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function ts(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Remote Balance (Sats) "),t.qZA())}function es(n,a){if(1&n&&(t.TgZ(0,"td",27),t.TgZ(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function ns(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",30),t.TgZ(1,"div",31),t.TgZ(2,"mat-select",32),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",33),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function is(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",34),t.TgZ(1,"button",35),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function as(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No pending channel available."),t.qZA())}function os(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting pending channels..."),t.qZA())}function ss(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function ls(n,a){if(1&n&&(t.TgZ(0,"td",36),t.YNc(1,as,2,0,"p",37),t.YNc(2,os,2,0,"p",37),t.YNc(3,ss,2,1,"p",37),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const rs=function(n){return{"display-none":n}};function cs(n,a){if(1&n&&t._UZ(0,"tr",38),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,rs,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function us(n,a){1&n&&t._UZ(0,"tr",39)}function ps(n,a){1&n&&t._UZ(0,"tr",40)}const ms=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},ds=function(){return["no_channel"]};let hs=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.commonService=o,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["state","alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.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(_.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.pendingChannels=e.pendingChannels,this.loadChannelsTable(),this.logger.info(e)}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.pendingChannels.length>0&&this.loadChannelsTable()}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{channel:e,channelsType:"pending",component:ot}}}))}loadChannelsTable(){this.pendingChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...this.pendingChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-pending-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("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,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3),t.TgZ(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,Vo,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,Go,2,0,"th",10),t.YNc(11,Xo,3,3,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,$o,2,0,"th",10),t.YNc(14,Wo,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Ko,2,0,"th",14),t.YNc(17,jo,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,ts,2,0,"th",14),t.YNc(20,es,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,ns,6,0,"th",17),t.YNc(23,is,3,0,"td",18),t.BQk(),t.ynx(24,19),t.YNc(25,ls,4,3,"td",20),t.BQk(),t.YNc(26,cs,1,3,"tr",21),t.YNc(27,us,1,0,"tr",22),t.YNc(28,ps,1,0,"tr",23),t.qZA(),t.qZA(),t._UZ(29,"mat-paginator",24),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,ms,""!==i.errorMessage)),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(13,ds)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,k.gD,k.$L,Q.ey,q.lW,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.rS,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var st=g(4290);const gs=["peersForm"],fs=["stepper"];function _s(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.peerFormLabel)}}function Cs(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Address is required."),t.qZA())}function xs(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.peerConnectionError)}}function ys(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.channelFormLabel)}}function Zs(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function Ts(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount must be a positive number."),t.qZA())}function As(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function Ls(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.channelConnectionError)}}let vs=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.formBuilder=s,this.actions=c,this.logger=f,this.faExclamationTriangle=Z.eHv,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 d.x,new d.x]}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:["",[m.kI.required]],peerAddress:[this.peerAddress,[m.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[m.kI.required,m.kI.min(1),m.kI.max(this.totalBalance)]],isPrivate:[!1],feeRate:[null],hiddenAmount:["",[m.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.NEWLY_ADDED_PEER_ECL||e.type===l.lr.FETCH_CHANNELS_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.NEWLY_ADDED_PEER_ECL&&(this.logger.info(e.payload),this.flgEditable=!1,this.newlyAddedPeer=e.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),e.type===l.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&("SaveNewPeer"===e.payload.action?this.peerConnectionError=e.payload.message:"SaveNewChannel"===e.payload.action&&(this.channelConnectionError=e.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,O.El)({payload:{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((0,O.YX)({payload:{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(e){switch(e.selectedIndex){default: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)"}e.selectedIndex{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(b.yh),t.Y36(m.qu),t.Y36(B.eX),t.Y36(R.mQ))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-connect-peer"]],viewQuery:function(e,i){if(1&e&&(t.Gf(gs,5),t.Gf(fs,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.stepper=o.first)}},decls:50,vars:20,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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",""],["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-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/vByte)","type","number","name","feeRate","tabindex","7",3,"step","min"],["mat-button","","color","primary","tabindex","8","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Connect to a new peer"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"div",7),t.TgZ(10,"mat-vertical-stepper",8,9),t.NdJ("selectionChange",function(s){return i.stepSelectionChanged(s)}),t.TgZ(12,"mat-step",10),t.TgZ(13,"form",11),t.YNc(14,_s,1,1,"ng-template",12),t.TgZ(15,"mat-form-field",1),t._UZ(16,"input",13),t.YNc(17,Cs,2,0,"mat-error",14),t.qZA(),t.YNc(18,xs,4,2,"div",15),t.TgZ(19,"div",16),t.TgZ(20,"button",17),t.NdJ("click",function(){return i.onConnectPeer()}),t._uU(21),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(22,"mat-step",10),t.TgZ(23,"form",18),t.YNc(24,ys,1,1,"ng-template",19),t.TgZ(25,"div",20),t.TgZ(26,"div",21),t.TgZ(27,"mat-form-field",22),t._UZ(28,"input",23),t.TgZ(29,"mat-hint"),t._uU(30),t.qZA(),t.TgZ(31,"span",24),t._uU(32," Sats "),t.qZA(),t.YNc(33,Zs,2,0,"mat-error",14),t.YNc(34,Ts,2,0,"mat-error",14),t.YNc(35,As,2,1,"mat-error",14),t.qZA(),t.TgZ(36,"div",25),t.TgZ(37,"mat-slide-toggle",26),t._uU(38,"Private Channel"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(39,"div",27),t.TgZ(40,"div",28),t.TgZ(41,"mat-form-field",1),t._UZ(42,"input",29),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(43,Ls,4,2,"div",15),t.TgZ(44,"div",16),t.TgZ(45,"button",30),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(46),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(47,"div",31),t.TgZ(48,"button",32),t.NdJ("click",function(){return i.onClose()}),t._uU(49),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(10),t.Q6J("linear",!0),t.xp6(2),t.Q6J("stepControl",i.peerFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.peerFormGroup),t.xp6(4),t.Q6J("ngIf",null==i.peerFormGroup.controls.peerAddress.errors?null:i.peerFormGroup.controls.peerAddress.errors.required),t.xp6(1),t.Q6J("ngIf",""!==i.peerConnectionError),t.xp6(3),t.Oqu(""!==i.peerConnectionError?"Retry":"Add Peer"),t.xp6(1),t.Q6J("stepControl",i.channelFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.channelFormGroup),t.xp6(5),t.Q6J("step",1e3),t.xp6(2),t.hij("Remaining Bal: ",i.totalBalance-(i.channelFormGroup.controls.fundingAmount.value?i.channelFormGroup.controls.fundingAmount.value:0),""),t.xp6(3),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.min),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.max),t.xp6(7),t.Q6J("step",1)("min",0),t.xp6(1),t.Q6J("ngIf",""!==i.channelConnectionError),t.xp6(3),t.Oqu(""!==i.channelConnectionError?"Retry":"Open Channel"),t.xp6(3),t.Oqu(null!=i.newlyAddedPeer&&i.newlyAddedPeer.nodeId?"Do It Later":"Close"))},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,A.dn,st.Vq,st.C0,m._Y,m.JL,m.sg,st.VY,x.KE,U.Nt,m.Fj,X.h,m.JJ,m.u,m.Q7,u.O5,m.wV,x.bx,x.R9,At.Rr,m.qQ,$.q,x.TO,I.BN],styles:[""]}),n})();function bs(n,a){1&n&&t._UZ(0,"mat-progress-bar",35)}function Ss(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," ID "),t.qZA())}const St=function(n){return{"max-width":n}};function ws(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(2,St,i.screenSize===i.screenSizeEnum.XS?"10rem":"30rem")),t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function Es(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," Alias "),t.qZA())}const wt=function(n){return{"mr-0":n}};function qs(n,a){if(1&n&&t._UZ(0,"span",42),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,wt,e.screenSize===e.screenSizeEnum.XS))}}function Is(n,a){if(1&n&&t._UZ(0,"span",43),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,wt,e.screenSize===e.screenSizeEnum.XS))}}function Fs(n,a){if(1&n&&(t.TgZ(0,"td",39),t.YNc(1,qs,1,3,"span",40),t.YNc(2,Is,1,3,"span",41),t._uU(3),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(4,St,i.screenSize===i.screenSizeEnum.XS?"10rem":"25rem")),t.xp6(1),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state),t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function Os(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," State "),t.qZA())}function Rs(n,a){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.state," ")}}function Ns(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," Network Address "),t.qZA())}function ks(n,a){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.address," ")}}function Ps(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," Channels "),t.qZA())}function Ds(n,a){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.channels," ")}}function Us(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",45),t.TgZ(1,"div",46),t.TgZ(2,"mat-select",47),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",48),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Ms(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",48),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onPeerDetach(o)}),t._uU(1,"Disconnect"),t.qZA()}}function Js(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",48),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onConnectPeer(o)}),t._uU(1,"Reconnect"),t.qZA()}}function Ys(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",49),t.TgZ(1,"div",46),t.TgZ(2,"mat-select",47),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",48),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onPeerClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",48),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onOpenChannel(s)}),t._uU(7,"Open Channel"),t.qZA(),t.YNc(8,Ms,2,0,"mat-option",50),t.YNc(9,Js,2,0,"mat-option",50),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(8),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state)}}function Qs(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No connected peer."),t.qZA())}function Hs(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting peers..."),t.qZA())}function Bs(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function zs(n,a){if(1&n&&(t.TgZ(0,"td",51),t.YNc(1,Qs,2,0,"p",52),t.YNc(2,Hs,2,0,"p",52),t.YNc(3,Bs,2,1,"p",52),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Vs=function(n){return{"display-none":n}};function Gs(n,a){if(1&n&&t._UZ(0,"tr",53),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Vs,(null==e.peers?null:e.peers.data)&&(null==e.peers||null==e.peers.data?null:e.peers.data.length)>0))}}function Xs(n,a){1&n&&t._UZ(0,"tr",54)}function $s(n,a){1&n&&t._UZ(0,"tr",55)}const Ws=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Ks=function(){return["no_peer"]};let js=(()=>{class n{constructor(e,i,o,s,c){this.logger=e,this.store=i,this.rtlEffects=o,this.actions=s,this.commonService=c,this.faUsers=Z.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","actions"]):this.screenSize===l.cu.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(_.yD).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.peersData=e.peers,this.loadPeersTable(this.peersData),this.logger.info(e)}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.availableBalance=e.onchainBalance.total||0}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_PEERS_ECL)).subscribe(e=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(e,i){const o=[[{key:"nodeId",value:e.nodeId,title:"Public Key",width:100}],[{key:"address",value:e.address,title:"Address",width:50},{key:"alias",value:e.alias,title:"Alias",width:50}],[{key:"state",value:this.commonService.titleCase(e.state),title:"State",width:50},{key:"channels",value:e.channels,title:"Channels",width:50}]];this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:e.nodeId,message:o}}}))}onConnectPeer(e){this.store.dispatch((0,v.qR)({payload:{data:{message:{peer:e.nodeId?e:null,information:this.information,balance:this.availableBalance},component:vs}}}))}onOpenChannel(e){this.store.dispatch((0,v.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:e,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:vt}}}))}onPeerDetach(e){this.store.dispatch(e.channels>0?(0,v.qR)({payload:{data:{type:l.n_.ERROR,alertTitle:"Disconnect Not Allowed",titleMessage:"Channel active with this peer."}}}):(0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(e.alias?e.alias:e.nodeId),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(i=>{i&&this.store.dispatch((0,O.GD)({payload:{nodeId:e.nodeId}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(e){this.peers=new r.by(e?[...e]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.peers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(K.V),t.Y36(B.eX),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Peers")}])],decls:42,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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,"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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"form",1,2),t.TgZ(3,"button",3),t.NdJ("click",function(){return i.onConnectPeer({})}),t._uU(4,"Add Peer"),t.qZA(),t.qZA(),t.TgZ(5,"div",4),t.TgZ(6,"div",5),t.TgZ(7,"div",6),t._UZ(8,"fa-icon",7),t.TgZ(9,"span",8),t._uU(10,"Peers"),t.qZA(),t.qZA(),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"div",10),t.TgZ(13,"input",11),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"div",12),t.YNc(15,bs,1,0,"mat-progress-bar",13),t.TgZ(16,"table",14,15),t.ynx(18,16),t.YNc(19,Ss,2,0,"th",17),t.YNc(20,ws,2,4,"td",18),t.BQk(),t.ynx(21,19),t.YNc(22,Es,2,0,"th",20),t.YNc(23,Fs,4,6,"td",21),t.BQk(),t.ynx(24,22),t.YNc(25,Os,2,0,"th",17),t.YNc(26,Rs,2,1,"td",23),t.BQk(),t.ynx(27,24),t.YNc(28,Ns,2,0,"th",17),t.YNc(29,ks,2,1,"td",23),t.BQk(),t.ynx(30,25),t.YNc(31,Ps,2,0,"th",17),t.YNc(32,Ds,2,1,"td",23),t.BQk(),t.ynx(33,26),t.YNc(34,Us,6,0,"th",27),t.YNc(35,Ys,10,2,"td",28),t.BQk(),t.ynx(36,29),t.YNc(37,zs,4,3,"td",30),t.BQk(),t.YNc(38,Gs,1,3,"tr",31),t.YNc(39,Xs,1,0,"tr",32),t.YNc(40,$s,1,0,"tr",33),t.qZA(),t.qZA(),t._UZ(41,"mat-paginator",34),t.qZA(),t.qZA()),2&e&&(t.xp6(8),t.Q6J("icon",i.faUsers),t.xp6(5),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.peers)("ngClass",t.VKq(12,Ws,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,Ks)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,m._Y,m.JL,m.F,q.lW,I.BN,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,z.gM,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-nodeId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:2rem}.mat-column-address[_ngcontent-%COMP%]{flex:1 1 15%;width:15%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const tl=["queryRoutesForm"];function el(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Destination Node ID is required."),t.qZA())}function nl(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function il(n,a){1&n&&t._UZ(0,"mat-progress-bar",31)}function al(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Alias "),t.qZA())}function ol(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function sl(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," ID "),t.qZA())}function ll(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function rl(n,a){1&n&&(t.TgZ(0,"th",34),t.TgZ(1,"span",35),t._uU(2,"Actions"),t.qZA(),t.qZA())}function cl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",36),t.TgZ(1,"button",37),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onHopClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function ul(n,a){1&n&&t._UZ(0,"tr",38)}function pl(n,a){1&n&&t._UZ(0,"tr",39)}const ml=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};let dl=(()=>{class n{constructor(e,i,o){this.store=e,this.eclEffects=i,this.commonService=o,this.nodeId="",this.amount=0,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=Z.FpQ,this.faExclamationTriangle=Z.eHv,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","actions"])}ngOnInit(){this.qrHops=new r.by([]),this.eclEffects.setQueryRoutes.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.qrHops.data=[],e&&e.length&&e.length>0?(this.flgLoading[0]=!1,this.qrHops=new r.by([...e]),this.qrHops.data=e):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null})}onQueryRoutes(){if(!this.nodeId||!this.amount)return!0;this.qrHops.data=[],this.flgLoading[0]=!0,this.store.dispatch((0,O.WO)({payload:{nodeId:this.nodeId,amount:1e3*this.amount}}))}resetData(){this.nodeId="",this.amount=0,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"alias",value:e.alias,title:"Alias",width:100,type:l.Gi.STRING}],[{key:"nodeId",value:e.nodeId,title:"Node ID",width:100,type:l.Gi.STRING}]]}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(it.o),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-query-routes"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(tl,7)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:39,vars:16,consts:[["fxLayout","column","fxFlex","100"],["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-1"],["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,"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(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0),t.TgZ(1,"form",1,2),t.NdJ("ngSubmit",function(){return t.CHM(o),t.MAs(2).form.valid&&i.onQueryRoutes()}),t.TgZ(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span"),t._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),t.qZA(),t.qZA(),t.TgZ(7,"mat-form-field",5),t.TgZ(8,"input",6,7),t.NdJ("ngModelChange",function(c){return i.nodeId=c}),t.qZA(),t.YNc(10,el,2,0,"mat-error",8),t.qZA(),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"input",10),t.NdJ("ngModelChange",function(c){return i.amount=c}),t.qZA(),t.YNc(13,nl,2,0,"mat-error",8),t.qZA(),t.TgZ(14,"div",11),t.TgZ(15,"button",12),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",13),t._uU(18,"Query Route"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(19,"div",14),t.TgZ(20,"div",15),t._UZ(21,"fa-icon",16),t.TgZ(22,"span",17),t._uU(23,"Transaction Route"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(24,"div",18),t.YNc(25,il,1,0,"mat-progress-bar",19),t.TgZ(26,"table",20,21),t.ynx(28,22),t.YNc(29,al,2,0,"th",23),t.YNc(30,ol,2,1,"td",24),t.BQk(),t.ynx(31,25),t.YNc(32,sl,2,0,"th",23),t.YNc(33,ll,2,1,"td",24),t.BQk(),t.ynx(34,26),t.YNc(35,rl,3,0,"th",27),t.YNc(36,cl,3,0,"td",28),t.BQk(),t.YNc(37,ul,1,0,"tr",29),t.YNc(38,pl,1,0,"tr",30),t.qZA(),t.qZA(),t.qZA()}2&e&&(t.xp6(4),t.Q6J("icon",i.faExclamationTriangle),t.xp6(4),t.Q6J("ngModel",i.nodeId),t.xp6(2),t.Q6J("ngIf",!i.nodeId),t.xp6(2),t.Q6J("ngModel",i.amount)("step",1e3)("min",0),t.xp6(1),t.Q6J("ngIf",!i.amount),t.xp6(8),t.Q6J("icon",i.faRoute),t.xp6(4),t.Q6J("ngIf",!0===i.flgLoading[0]),t.xp6(1),t.Q6J("dataSource",i.qrHops)("ngClass",t.VKq(14,ml,"error"===i.flgLoading[0])),t.xp6(11),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns))},directives:[p.xw,p.yH,m._Y,m.JL,m.F,p.Wh,I.BN,x.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,u.O5,m.wV,m.qQ,$.q,q.lW,Y.$V,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.as,r.nj,x.TO,M.pW,r.ge,T.nU,r.ev,r.XQ,r.Gk],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}"]}),n})();function hl(n,a){1&n&&t._UZ(0,"mat-progress-bar",29)}function gl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," State "),t.qZA())}function fl(n,a){if(1&n&&(t.TgZ(0,"span",36),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function _l(n,a){if(1&n&&(t.TgZ(0,"span",38),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const Et=function(n){return{"max-width":n}};function Cl(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"div",32),t.YNc(2,fl,2,1,"span",33),t.YNc(3,_l,2,1,"span",34),t.TgZ(4,"span",35),t._uU(5),t.ALo(6,"titlecase"),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(6,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(t.lcZ(6,4,null==e?null:e.state))}}function xl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Short Channel ID "),t.qZA())}function yl(n,a){if(1&n&&(t.TgZ(0,"td",31),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.shortChannelId)}}function Zl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Alias "),t.qZA())}function Tl(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"div",32),t.TgZ(2,"span",35),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(2),t.Oqu(e.alias)}}function Al(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Local Balance (Sats) "),t.qZA())}function Ll(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function vl(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Remote Balance (Sats) "),t.qZA())}function bl(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Sl(n,a){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Balance Score "),t.qZA())}function wl(n,a){if(1&n&&(t.TgZ(0,"td",42),t.TgZ(1,"div",43),t.TgZ(2,"mat-hint",44),t._uU(3),t.ALo(4,"number"),t.qZA(),t.qZA(),t._UZ(5,"mat-progress-bar",45),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function El(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",46),t.TgZ(1,"div",47),t.TgZ(2,"mat-select",48),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function ql(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",50),t.TgZ(1,"div",51),t.TgZ(2,"mat-select",52),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",49),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(7,"Force Close"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Il(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No inactive channel available."),t.qZA())}function Fl(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting inactive channels..."),t.qZA())}function Ol(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Rl(n,a){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,Il,2,0,"p",54),t.YNc(2,Fl,2,0,"p",54),t.YNc(3,Ol,2,1,"p",54),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Nl=function(n){return{"display-none":n}};function kl(n,a){if(1&n&&t._UZ(0,"tr",55),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Nl,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Pl(n,a){1&n&&t._UZ(0,"tr",56)}function Dl(n,a){1&n&&t._UZ(0,"tr",57)}const Ul=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Ml=function(){return["no_channel"]};let Jl=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.faEye=Z.Mdf,this.faEyeSlash=Z.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS||this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.inactiveChannels=e.inactiveChannels,this.loadChannelsTable(),this.logger.info(e)}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.inactiveChannels.length>0&&this.loadChannelsTable()}onChannelClose(e,i){this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:i?"Force Close Channel":"Close Channel",titleMessage:i?"Force closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId):"Closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),noBtnText:"Cancel",yesBtnText:i?"Force Close":"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(f=>{f&&this.store.dispatch((0,O.BL)({payload:{channelId:e.channelId,force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLocaleLowerCase()}onChannelClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{channel:e,channelsType:"inactive",component:ot}}}))}loadChannelsTable(){this.inactiveChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...this.inactiveChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(K.V),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-inactive-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:36,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","shortChannelId"],["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","","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-1",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"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3),t.TgZ(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,hl,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,gl,2,0,"th",10),t.YNc(11,Cl,7,8,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,xl,2,0,"th",10),t.YNc(14,yl,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Zl,2,0,"th",10),t.YNc(17,Tl,4,4,"td",11),t.BQk(),t.ynx(18,14),t.YNc(19,Al,2,0,"th",15),t.YNc(20,Ll,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,vl,2,0,"th",15),t.YNc(23,bl,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,Sl,2,0,"th",18),t.YNc(26,wl,6,4,"td",19),t.BQk(),t.ynx(27,20),t.YNc(28,El,6,0,"th",21),t.YNc(29,ql,8,0,"td",22),t.BQk(),t.ynx(30,23),t.YNc(31,Rl,4,3,"td",24),t.BQk(),t.YNc(32,kl,1,3,"tr",25),t.YNc(33,Pl,1,0,"tr",26),t.YNc(34,Dl,1,0,"tr",27),t.qZA(),t.qZA(),t._UZ(35,"mat-paginator",28),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,Ul,""!==i.errorMessage)),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(13,Ml)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,z.gM,I.BN,x.bx,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.rS,u.JJ],styles:[".mat-column-state[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-state[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 20%;width:20%}.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})(),Yl=(()=>{class n{transform(e,i){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(o,s)=>o.toUpperCase()).replace(/\s+/g,"").replace(/-/g," ")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=t.Yjl({name:"camelcase",type:n,pure:!0}),n})();function Ql(n,a){if(1&n&&(t.TgZ(0,"div",5),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function Hl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",6),t._UZ(1,"div",7),t.TgZ(2,"mat-form-field",8),t.TgZ(3,"input",9),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().filterValue=o})("input",function(){return t.CHM(e),t.oxw().applyFilter()})("keyup",function(){return t.CHM(e),t.oxw().applyFilter()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.filterValue)}}function Bl(n,a){1&n&&t._UZ(0,"mat-progress-bar",32)}function zl(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Date/Time"),t.qZA())}const Vl=function(n){return{"ml-0":n}};function Gl(n,a){if(1&n&&(t._UZ(0,"span",36),t.ALo(1,"camelcase")),2&n){const e=t.oxw().$implicit,i=t.oxw(2);t.s9C("matTooltip",t.lcZ(1,2,null==e?null:e.type)),t.Q6J("ngClass",t.VKq(4,Vl,i.screenSize===i.screenSizeEnum.XS))}}function Xl(n,a){if(1&n&&(t.TgZ(0,"td",34),t.YNc(1,Gl,2,6,"span",35),t._uU(2),t.ALo(3,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","payment-relayed"!==(null==e?null:e.type)),t.xp6(1),t.hij(" ",t.xi3(3,2,null==e?null:e.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function $l(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"In Channel"),t.qZA())}const qt=function(n){return{"max-width":n}};function Wl(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,qt,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.fromChannelAlias)}}function Kl(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Out Channel"),t.qZA())}function jl(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,qt,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.toChannelAlias)}}function tr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount In (Sats)"),t.qZA())}function er(n,a){if(1&n&&(t.TgZ(0,"td",34),t.TgZ(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountIn))}}function nr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount Out (Sats)"),t.qZA())}function ir(n,a){if(1&n&&(t.TgZ(0,"td",34),t.TgZ(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountOut))}}function ar(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Fee Earned (Sats)"),t.qZA())}function or(n,a){if(1&n&&(t.TgZ(0,"td",34),t.TgZ(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,(null==e?null:e.amountIn)-(null==e?null:e.amountOut)))}}function sr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",40),t.TgZ(1,"div",41),t.TgZ(2,"mat-select",42),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",43),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function lr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",44),t.TgZ(1,"button",45),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw(2).onForwardingEventClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function rr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No forwarding history available."),t.qZA())}function cr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting forwarding history..."),t.qZA())}function ur(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function pr(n,a){if(1&n&&(t.TgZ(0,"td",46),t.YNc(1,rr,2,0,"p",47),t.YNc(2,cr,2,0,"p",47),t.YNc(3,ur,2,1,"p",47),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const mr=function(n){return{"display-none":n}};function dr(n,a){if(1&n&&t._UZ(0,"tr",48),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,mr,(null==e.forwardingHistoryEvents?null:e.forwardingHistoryEvents.data)&&(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)>0))}}function hr(n,a){1&n&&t._UZ(0,"tr",49)}function gr(n,a){1&n&&t._UZ(0,"tr",50)}const fr=function(){return["no_event"]};function _r(n,a){if(1&n&&(t.TgZ(0,"div",10),t.YNc(1,Bl,1,0,"mat-progress-bar",11),t.TgZ(2,"table",12,13),t.ynx(4,14),t.YNc(5,zl,2,0,"th",15),t.YNc(6,Xl,4,5,"td",16),t.BQk(),t.ynx(7,17),t.YNc(8,$l,2,0,"th",15),t.YNc(9,Wl,2,4,"td",18),t.BQk(),t.ynx(10,19),t.YNc(11,Kl,2,0,"th",15),t.YNc(12,jl,2,4,"td",18),t.BQk(),t.ynx(13,20),t.YNc(14,tr,2,0,"th",21),t.YNc(15,er,4,3,"td",16),t.BQk(),t.ynx(16,22),t.YNc(17,nr,2,0,"th",21),t.YNc(18,ir,4,3,"td",16),t.BQk(),t.ynx(19,23),t.YNc(20,ar,2,0,"th",21),t.YNc(21,or,4,3,"td",16),t.BQk(),t.ynx(22,24),t.YNc(23,sr,6,0,"th",25),t.YNc(24,lr,3,0,"td",26),t.BQk(),t.ynx(25,27),t.YNc(26,pr,4,3,"td",28),t.BQk(),t.YNc(27,dr,1,3,"tr",29),t.YNc(28,hr,1,0,"tr",30),t.YNc(29,gr,1,0,"tr",31),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.forwardingHistoryEvents),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(6,fr)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}function Cr(n,a){if(1&n&&t._UZ(0,"mat-paginator",51),2&n){const e=t.oxw();t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let It=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.eventsData=[],this.filterValue="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","fee","actions"]):this.screenSize===l.cu.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(_.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{0===this.eventsData.length&&(this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.eventsData=e.payments&&e.payments.relayed?e.payments.relayed:[],this.eventsData.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.eventsData),this.logger.info(this.eventsData))})}ngAfterViewInit(){this.eventsData.length>0&&this.loadForwardingEventsTable(this.eventsData)}ngOnChanges(e){e.eventsData&&(this.apiCallStatus={status:l.Bn.COMPLETED,action:"FetchPayments"},this.eventsData=e.eventsData.currentValue,e.eventsData.firstChange||this.loadForwardingEventsTable(this.eventsData)),e.filterValue&&!e.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(e,i){const o=[[{key:"paymentHash",value:e.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"timestamp",value:Math.round(e.timestamp/1e3),title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"fee",value:e.amountIn-e.amountOut,title:"Fee Earned (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"amountIn",value:e.amountIn,title:"Amount In (Sats)",width:50,type:l.Gi.NUMBER},{key:"amountOut",value:e.amountOut,title:"Amount Out (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"fromChannelAlias",value:e.fromChannelAlias,title:"From Channel Alias",width:50,type:l.Gi.STRING},{key:"fromShortChannelId",value:e.fromShortChannelId,title:"From Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"fromChannelId",value:e.fromChannelId,title:"From Channel Id",width:100,type:l.Gi.STRING}],[{key:"toChannelAlias",value:e.toChannelAlias,title:"To Channel Alias",width:50,type:l.Gi.STRING},{key:"toShortChannelId",value:e.toShortChannelId,title:"To Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"To Channel Id",width:100,type:l.Gi.STRING}]];"payment-relayed"!==e.type&&o.unshift([{key:"type",value:this.commonService.camelCase(e.type),title:"Relay Type",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Event Information",message:o}}}))}loadForwardingEventsTable(e){this.forwardingHistoryEvents=new r.by([...e]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(i,o)=>"fee"===o?i.amountIn-i.amountOut:i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.forwardingHistoryEvents.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.forwardingHistoryEvents.paginator=this.paginator,this.applyFilter(),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-forwarding-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Events")}]),t.TTD],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"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"],["mode","indeterminate",4,"ngIf"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot yellow","matTooltipPosition","right",3,"matTooltip","ngClass",4,"ngIf"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip","ngClass"],["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",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ql,2,1,"div",1),t.YNc(2,Hl,4,1,"div",2),t.YNc(3,_r,30,7,"div",3),t.YNc(4,Cr,1,3,"mat-paginator",4),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,r.BZ,T.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,M.pW,r.ge,T.nU,r.ev,z.gM,u.mk,S.oO,u.PC,S.Zl,k.gD,k.$L,Q.ey,q.lW,r.yh,r.Q2,r.XQ,r.Gk,L.NW],pipes:[u.uU,Yl,u.JJ],styles:[".mat-column-fromAlias[_ngcontent-%COMP%]{padding-left:2rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-toAlias[_ngcontent-%COMP%]{padding-left:1rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const xr=["tableIn"],yr=["tableOut"],Zr=["paginatorIn"],Tr=["paginatorOut"];function Ar(n,a){if(1&n&&(t.TgZ(0,"div",3),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function Lr(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function vr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}const j=function(n){return{"max-width":n}};function br(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function Sr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function wr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function Er(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function qr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function Ir(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function Fr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function Or(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function Rr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function Nr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No incoming routing peer available."),t.qZA())}function kr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting incoming routing peers..."),t.qZA())}function Pr(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Dr(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,Nr,2,0,"p",43),t.YNc(2,kr,2,0,"p",43),t.YNc(3,Pr,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersIncoming&&e.RoutingPeersIncoming.data)||(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersIncoming&&e.RoutingPeersIncoming.data)||(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersIncoming&&e.RoutingPeersIncoming.data)||(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Ft=function(n){return{"display-none":n}};function Ur(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Ft,(null==e.RoutingPeersIncoming?null:e.RoutingPeersIncoming.data)&&(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)>0))}}function Mr(n,a){1&n&&t._UZ(0,"tr",45)}function Jr(n,a){1&n&&t._UZ(0,"tr",46)}function Yr(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function Qr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}function Hr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function Br(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function zr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function Vr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function Gr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function Xr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function $r(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function Wr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function Kr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function jr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No outgoing routing peer available."),t.qZA())}function tc(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting outgoing routing peers..."),t.qZA())}function ec(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function nc(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,jr,2,0,"p",43),t.YNc(2,tc,2,0,"p",43),t.YNc(3,ec,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersOutgoing&&e.RoutingPeersOutgoing.data)||(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersOutgoing&&e.RoutingPeersOutgoing.data)||(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersOutgoing&&e.RoutingPeersOutgoing.data)||(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function ic(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Ft,(null==e.RoutingPeersOutgoing?null:e.RoutingPeersOutgoing.data)&&(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)>0))}}function ac(n,a){1&n&&t._UZ(0,"tr",45)}function oc(n,a){1&n&&t._UZ(0,"tr",46)}const sc=function(n,a){return{"mt-2":n,"mt-1":a}},lc=function(){return["no_incoming_event"]},rc=function(n){return{"mt-2":n}},cc=function(){return["no_outgoing_event"]};function uc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",4),t.TgZ(1,"div",5),t.TgZ(2,"div",6),t.TgZ(3,"div",7),t._uU(4,"Incoming"),t.qZA(),t.TgZ(5,"mat-form-field",8),t.TgZ(6,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyIncomingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterIn=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(7,"div",10),t.YNc(8,Lr,1,0,"mat-progress-bar",11),t.TgZ(9,"table",12,13),t.ynx(11,14),t.YNc(12,vr,2,0,"th",15),t.YNc(13,br,2,4,"td",16),t.BQk(),t.ynx(14,17),t.YNc(15,Sr,2,0,"th",15),t.YNc(16,wr,2,4,"td",16),t.BQk(),t.ynx(17,18),t.YNc(18,Er,2,0,"th",19),t.YNc(19,qr,4,3,"td",20),t.BQk(),t.ynx(20,21),t.YNc(21,Ir,2,0,"th",19),t.YNc(22,Fr,4,3,"td",20),t.BQk(),t.ynx(23,22),t.YNc(24,Or,2,0,"th",19),t.YNc(25,Rr,4,3,"td",20),t.BQk(),t.ynx(26,23),t.YNc(27,Dr,4,3,"td",24),t.BQk(),t.YNc(28,Ur,1,3,"tr",25),t.YNc(29,Mr,1,0,"tr",26),t.YNc(30,Jr,1,0,"tr",27),t.qZA(),t.qZA(),t._UZ(31,"mat-paginator",28,29),t.qZA(),t.TgZ(33,"div",30),t.TgZ(34,"div",6),t.TgZ(35,"div",7),t._uU(36,"Outgoing"),t.qZA(),t.TgZ(37,"mat-form-field",8),t.TgZ(38,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterOut=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(39,"div",31),t.YNc(40,Yr,1,0,"mat-progress-bar",11),t.TgZ(41,"table",32,33),t.ynx(43,14),t.YNc(44,Qr,2,0,"th",15),t.YNc(45,Hr,2,4,"td",16),t.BQk(),t.ynx(46,17),t.YNc(47,Br,2,0,"th",15),t.YNc(48,zr,2,4,"td",16),t.BQk(),t.ynx(49,18),t.YNc(50,Vr,2,0,"th",19),t.YNc(51,Gr,4,3,"td",20),t.BQk(),t.ynx(52,21),t.YNc(53,Xr,2,0,"th",19),t.YNc(54,$r,4,3,"td",20),t.BQk(),t.ynx(55,22),t.YNc(56,Wr,2,0,"th",19),t.YNc(57,Kr,4,3,"td",20),t.BQk(),t.ynx(58,34),t.YNc(59,nc,4,3,"td",24),t.BQk(),t.YNc(60,ic,1,3,"tr",25),t.YNc(61,ac,1,0,"tr",26),t.YNc(62,oc,1,0,"tr",27),t.qZA(),t._UZ(63,"mat-paginator",28,35),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngClass",t.WLB(22,sc,e.screenSize===e.screenSizeEnum.XS,e.screenSize===e.screenSizeEnum.SM)),t.xp6(4),t.Q6J("ngModel",e.filterIn),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersIncoming),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(25,lc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS),t.xp6(3),t.Q6J("ngClass",t.VKq(26,rc,e.screenSize!==e.screenSizeEnum.LG)),t.xp6(4),t.Q6J("ngModel",e.filterOut),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersOutgoing),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(28,cc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let pc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.routingPeersData=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","totalFee"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalFee"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalAmount","totalFee"]):(this.flgSticky=!0,this.displayedColumns=["channelId","alias","events","totalAmount","totalFee"])}ngOnInit(){this.store.select(_.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.routingPeersData=e.payments&&e.payments.relayed?e.payments.relayed:[],this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData),this.logger.info(e)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData)}loadRoutingPeersTable(e){if(e.length>0){const i=this.groupRoutingPeers(e);this.RoutingPeersIncoming=new r.by(i[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(i[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter()}groupRoutingPeers(e){const i=[],o=[];return e.forEach(s=>{const c=i.find(P=>P.channelId===s.fromChannelId),f=o.find(P=>P.channelId===s.toChannelId);c?(c.events++,c.totalAmount=+c.totalAmount+ +s.amountIn,c.totalFee=s.amountIn-s.amountOut+ +c.totalFee):i.push({channelId:s.fromChannelId,alias:s.fromChannelAlias,events:1,totalAmount:+s.amountIn,totalFee:s.amountIn-s.amountOut}),f?(f.events++,f.totalAmount=+f.totalAmount+ +s.amountOut,f.totalFee=s.amountIn-s.amountOut+ +f.totalFee):o.push({channelId:s.toChannelId,alias:s.toChannelAlias,events:1,totalAmount:+s.amountOut,totalFee:s.amountIn-s.amountOut})}),[this.commonService.sortDescByKey(i,"totalFee"),this.commonService.sortDescByKey(o,"totalFee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(xr,5,T.YE),t.Gf(yr,5,T.YE),t.Gf(Zr,5),t.Gf(Tr,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sortIn=o.first),t.iGM(o=t.CRH())&&(i.sortOut=o.first),t.iGM(o=t.CRH())&&(i.paginatorIn=o.first),t.iGM(o=t.CRH())&&(i.paginatorOut=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Peers")}])],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","page-sub-title-container",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"page-sub-title-container"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch",1,"mb-4"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start start","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",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"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch",1,"mb-4"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ar,2,1,"div",1),t.YNc(2,uc,65,29,"div",2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,u.mk,S.oO,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,r.BZ,T.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function mc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",7),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let dc=(()=>{class n{constructor(e){this.router=e,this.faChartBar=Z.koM,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Reports"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t.TgZ(7,"nav",5),t.YNc(8,mc,2,3,"div",6),t.qZA(),t._UZ(9,"router-outlet"),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartBar),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,N.BU,u.sg,y.lC,N.Nj,y.rH],styles:[""]}),n})();var Ot=g(4821),Rt=g(6831),Nt=g(3035);function hc(n,a){if(1&n&&(t.TgZ(0,"div",8),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.totalFeeSat),t.xp6(1),t.AsE("",t.xi3(2,3,e.totalFeeSat||0,"1.0-2")," Sats/",t.lcZ(3,6,e.filteredEventsBySelectedPeriod.length||0)," Events")}}function gc(n,a){1&n&&(t.TgZ(0,"div",9),t._uU(1,"No fee report for the selected period"),t.qZA())}function fc(n,a){if(1&n&&(t.TgZ(0,"span"),t.TgZ(1,"span",12),t._uU(2),t.ALo(3,"number"),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.ALo(6,"number"),t.qZA(),t.qZA()),2&n){const e=a.model;t.xp6(2),t.hij("Events: ",t.lcZ(3,2,e.extra.totalEvents||0),""),t.xp6(3),t.hij("Fee: ",t.xi3(6,4,e.value||0,"1.0-2"),"")}}function _c(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical",10),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,fc,7,7,"ng-template",null,11,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("view",e.view)("results",e.feeReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function Cc(n,a){if(1&n&&t._UZ(0,"rtl-ecl-forwarding-history",13),2&n){const e=t.oxw();t.Q6J("eventsData",e.filteredEventsBySelectedPeriod)("filterValue",e.eventFilterValue)}}let xc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.totalFeeSat=null,this.today=new Date(Date.now()),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=l.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(_.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.events=e.payments&&e.payments.relayed?e.payments.relayed:[],this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(e)}),this.commonService.containerSizeUpdated.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2]})}filterForwardingEvents(e,i){const o=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3);this.logger.info("Filtering Forwarding Events Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()+" To "+i.toLocaleString()),this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeSat=null,this.events&&this.events.length>0&&(this.events.forEach(c=>{Math.floor(c.timestamp/1e3)>=o&&Math.floor(c.timestamp/1e3)0&&"ngx-charts"===e.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(e){this.eventFilterValue=this.reportPeriod===l.op[1]?e.name+"/"+this.startDate.getFullYear():e.name.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(e){const i=Math.round(e.getTime()/1e3),o=[];if(this.logger.info("Fee Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(s=>{const c=new Date(s.timestamp).getMonth();return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s{const c=Math.floor((Math.floor(s.timestamp/1e3)-i)/this.secondsInADay);return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}return this.logger.info("Fee Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),o}onSelectionChange(e){const i=e.selDate.getMonth(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.gg[e].days+1:l.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-fee-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},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"],["class","one-color",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"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2),t.YNc(3,hc,4,8,"div",3),t.YNc(4,gc,2,0,"div",4),t.TgZ(5,"div",5),t.YNc(6,_c,3,11,"ngx-charts-bar-vertical",6),t.qZA(),t.TgZ(7,"div",5),t.YNc(8,Cc,1,2,"rtl-ecl-forwarding-history",7),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(1),t.Q6J("ngIf",i.feeReportData.length<=0||i.filteredEventsBySelectedPeriod.length<=0),t.xp6(2),t.Q6J("ngIf",i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(2),t.Q6J("ngIf",i.filteredEventsBySelectedPeriod.length>0))},directives:[p.xw,p.Wh,p.yH,Rt.D,u.O5,Nt.K$,It],pipes:[u.JJ],styles:[""],data:{animation:[Ot.J]}}),n})();var yc=g(6785);function Zc(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Paid ",t.xi3(2,2,e.transactionsReportSummary.amountPaidSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function Tc(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Received ",t.xi3(2,2,e.transactionsReportSummary.amountReceivedSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Ac(n,a){if(1&n&&(t.TgZ(0,"div",8),t.YNc(1,Zc,4,7,"div",9),t.YNc(2,Tc,4,7,"div",9),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.transactionsReportSummary),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.paymentsSelectedPeriod),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.invoicesSelectedPeriod)}}function Lc(n,a){1&n&&(t.TgZ(0,"div",11),t._uU(1,"No transactions report for the selected period"),t.qZA())}function vc(n,a){if(1&n&&(t.TgZ(0,"span",14),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=a.model;t.xp6(1),t.HOy("",e.name,": ",t.xi3(2,4,e.value||0,"1.0-2"),"/# ","Paid"===e.name?"Payments":"Invoices",": ",t.lcZ(3,7,(null==e.extra?null:e.extra.total)||0),"")}}function bc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical-2d",12),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,vc,4,9,"ng-template",null,13,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("view",e.view)("results",e.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",e.reportPeriod===e.scrollRanges[0]?2:8)}}function Sc(n,a){if(1&n&&t._UZ(0,"rtl-transactions-report-table",15),2&n){const e=t.oxw();t.Q6J("dataList",e.transactionsNonZeroReportData)("dataRange",e.reportPeriod)("filterValue",e.transactionFilterValue)}}let wc=(()=>{class n{constructor(e,i){this.commonService=e,this.store=i,this.scrollRanges=l.op,this.reportPeriod=l.op[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.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=l.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(_.PP).pipe((0,h.R)(this.unSubs[0]),(0,tt.M)(this.store.select(_.Ef))).subscribe(([e,i])=>{this.payments=e.payments.sent?e.payments.sent:[],this.invoices=i.invoices?i.invoices:[],(this.payments.length>0||this.invoices.length>0)&&(this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData())}),this.commonService.containerSizeUpdated.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2]})}onChartMouseUp(e){"svg"===e.srcElement.tagName&&e.srcElement.classList.length>0&&"ngx-charts"===e.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(e){this.transactionFilterValue=this.reportPeriod===l.op[1]?e.series.toString()+"/"+this.startDate.getFullYear():e.series.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(e,i){const o=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3),c=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const f=this.payments.filter(C=>Math.floor(C.firstPartTimestamp/1e3)>=o&&Math.floor(C.firstPartTimestamp/1e3)"received"===C.status&&C.timestamp>=o&&C.timestamp{const E=new Date(C.firstPartTimestamp).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+C.recipientAmount,c[E].series[0].value=c[E].series[0].value+C.recipientAmount,c[E].series[0].extra.total=c[E].series[0].extra.total+1,this.transactionsReportSummary}),P.map(C=>{const E=new Date(1e3*C.timestamp).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+C.amountSettled,c[E].series[1].value=c[E].series[1].value+C.amountSettled,c[E].series[1].extra.total=c[E].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let C=0;C{const E=Math.floor((Math.floor(C.firstPartTimestamp/1e3)-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+C.recipientAmount,c[E].series[0].value=c[E].series[0].value+C.recipientAmount,c[E].series[0].extra.total=c[E].series[0].extra.total+1,this.transactionsReportSummary}),P.map(C=>{const E=Math.floor((C.timestamp-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+C.amountSettled,c[E].series[1].value=c[E].series[1].value+C.amountSettled,c[E].series[1].extra.total=c[E].series[1].extra.total+1,this.transactionsReportSummary})}return c}prepareTableData(){return this.transactionsReportData.reduce((e,i)=>i.series[0].extra.total>0||i.series[1].extra.total>0?e.concat({date:i.date,amount_paid:i.series[0].value,num_payments:i.series[0].extra.total,amount_received:i.series[1].value,num_invoices:i.series[1].extra.total}):e,[])}onSelectionChange(e){const i=e.selDate.getMonth(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.gg[e].days+1:l.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(F.v),t.Y36(b.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-transactions-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},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"],["class","two-color",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"],[1,"two-color",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2),t.YNc(3,Ac,3,3,"div",3),t.YNc(4,Lc,2,0,"div",4),t.TgZ(5,"div",5),t.YNc(6,bc,3,13,"ngx-charts-bar-vertical-2d",6),t.qZA(),t.TgZ(7,"div",5),t.YNc(8,Sc,1,3,"rtl-transactions-report-table",7),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(1),t.Q6J("ngIf",i.transactionsNonZeroReportData.length<=0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0))},directives:[p.xw,p.Wh,p.yH,Rt.D,u.O5,Nt.H5,yc.g],pipes:[u.JJ],styles:[""],data:{animation:[Ot.J]}}),n})();var w=g(3894),Ec=g(5704);function qc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",8),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}const Oc=y.Bz.forChild([{path:"",component:rt,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:wi,canActivate:[w.fY]},{path:"onchain",component:ua,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:Ua,canActivate:[w.fY]},{path:"send",component:Ma,canActivate:[w.fY]}]},{path:"connections",component:da,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:ao,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:zo,canActivate:[w.fY]},{path:"pending",component:hs,canActivate:[w.fY]},{path:"inactive",component:Jl,canActivate:[w.fY]}]},{path:"peers",component:js,data:{sweepAll:!1},canActivate:[w.fY]}]},{path:"transactions",component:ga,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:gt,canActivate:[w.fY]},{path:"invoices",component:dt,canActivate:[w.fY]}]},{path:"routing",component:_a,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:It,canActivate:[w.fY]},{path:"peers",component:pc,canActivate:[w.fY]}]},{path:"reports",component:dc,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:xc,canActivate:[w.fY]},{path:"transactions",component:wc,canActivate:[w.fY]}]},{path:"graph",component:(()=>{class n{constructor(e){this.router=e,this.faSearch=Z.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-graph"]],decls:11,vars:2,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"],["fxLayout","column"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Graph Lookups"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t.TgZ(7,"nav",5),t.YNc(8,qc,2,3,"div",6),t.qZA(),t.TgZ(9,"div",7),t._UZ(10,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faSearch),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,N.BU,u.sg,p.yH,y.lC,N.Nj,y.rH],styles:[""]}),n})(),canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:Pa,canActivate:[w.fY]},{path:"queryroutes",component:dl,canActivate:[w.fY]}]},{path:"**",component:Ec.w}]}]);var Rc=g(3387);let Nc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n,bootstrap:[rt]}),n.\u0275inj=t.cJS({providers:[w.fY],imports:[[u.ez,Rc.m,Oc]]}),n})()}}]); \ No newline at end of file diff --git a/angular/871.d455809c35893640.js b/angular/871.d455809c35893640.js new file mode 100644 index 00000000..f5884a06 --- /dev/null +++ b/angular/871.d455809c35893640.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[871],{2871:(kc,lt,g)=>{g.r(lt),g.d(lt,{ECLModule:()=>Nc});var u=g(6019),y=g(7292),kt=g(7362),t=g(3668),p=g(2438),M=g(9009);function Pt(n,a){1&n&&t._UZ(0,"mat-progress-bar",3)}let rt=(()=>{class n{constructor(e){this.router=e,this.loading=!1,this.router.events.subscribe(i=>{switch(!0){case i instanceof y.OD:this.loading=!0;break;case i instanceof y.m2:case i instanceof y.gk:case i instanceof y.Q3:this.loading=!1}})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Pt,1,0,"mat-progress-bar",1),t._UZ(2,"router-outlet",null,2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.loading))},directives:[p.xw,p.yH,p.Wh,u.O5,y.lC,M.pW],styles:[""],data:{animation:[kt.g]}}),n})();var d=g(7396),h=g(5022),tt=g(1818),ct=g(6424),Z=g(9594),l=g(4798),_=g(9132),R=g(507),b=g(7852),F=g(4234),I=g(3868),ut=g(6167),A=g(888),et=g(3530),S=g(8866),q=g(86),pt=g(9112);const mt=function(n){return{backgroundColor:n}};function Dt(n,a){if(1&n&&t._UZ(0,"span",6),2&n){const e=t.oxw();t.Q6J("ngStyle",t.VKq(1,mt,null==e.information?null:e.information.color))}}function Ut(n,a){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"h4",1),t._uU(2,"Color"),t.qZA(),t.TgZ(3,"div",2),t._UZ(4,"span",7),t._uU(5),t.ALo(6,"uppercase"),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(4),t.Q6J("ngStyle",t.VKq(4,mt,null==e.information?null:e.information.color)),t.xp6(1),t.hij(" ",t.lcZ(6,2,null==e.information?null:e.information.color)," ")}}function Mt(n,a){if(1&n&&(t.TgZ(0,"span",2),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}let Jt=(()=>{class n{constructor(e){this.commonService=e,this.chains=[""]}ngOnChanges(){this.chains=[],this.chains.push("Bitcoin "+(this.information.network?this.commonService.titleCase(this.information.network):"Testnet"))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[t.TTD],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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div"),t.TgZ(2,"h4",1),t._uU(3,"Alias"),t.qZA(),t.TgZ(4,"div",2),t._uU(5),t.YNc(6,Dt,1,3,"span",3),t.qZA(),t.qZA(),t.YNc(7,Ut,7,6,"div",4),t.TgZ(8,"div"),t.TgZ(9,"h4",1),t._uU(10,"Implementation"),t.qZA(),t.TgZ(11,"div",2),t._uU(12),t.qZA(),t.qZA(),t.TgZ(13,"div"),t.TgZ(14,"h4",1),t._uU(15,"Chain"),t.qZA(),t.YNc(16,Mt,2,1,"span",5),t.qZA(),t.qZA()),2&e&&(t.xp6(5),t.hij(" ",null==i.information?null:i.information.alias," "),t.xp6(1),t.Q6J("ngIf",!i.showColorFieldSeparately),t.xp6(1),t.Q6J("ngIf",i.showColorFieldSeparately),t.xp6(5),t.Oqu(null!=i.information&&i.information.lnImplementation||null!=i.information&&i.information.version?(null==i.information?null:i.information.lnImplementation)+" "+(null==i.information?null:i.information.version):""),t.xp6(4),t.Q6J("ngForOf",i.chains))},directives:[p.xw,p.yH,p.Wh,u.O5,u.sg,u.PC,S.Zl],pipes:[u.gd],styles:[""]}),n})();function Yt(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div"),t.TgZ(2,"h4",3),t._uU(3,"Lightning"),t.qZA(),t.TgZ(4,"div",4),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",5),t.qZA(),t.TgZ(8,"div"),t.TgZ(9,"h4",3),t._uU(10,"On-chain"),t.qZA(),t.TgZ(11,"div",4),t._uU(12),t.ALo(13,"number"),t.qZA(),t._UZ(14,"mat-progress-bar",5),t.qZA(),t.TgZ(15,"div"),t.TgZ(16,"h4",3),t._uU(17,"Total"),t.qZA(),t.TgZ(18,"div",4),t._uU(19),t.ALo(20,"number"),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(5),t.hij("",t.lcZ(6,5,e.balances.lightning)," Sats"),t.xp6(2),t.s9C("value",e.balances.lightning/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(13,7,e.balances.onchain)," Sats"),t.xp6(2),t.s9C("value",e.balances.onchain/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(20,9,e.balances.total)," Sats")}}function Qt(n,a){if(1&n&&(t.TgZ(0,"div",6),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let Ht=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,Yt,21,11,"div",0),t.YNc(1,Qt,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,M.pW],pipes:[u.JJ],styles:[""]}),n})();var x=g(8167),z=g(7444),G=g(5694),Y=g(7706);function Bt(n,a){if(1&n&&(t.TgZ(0,"div",19),t.TgZ(1,"span",20),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",6),t.TgZ(5,"mat-hint",21),t.TgZ(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",22),t._UZ(11,"fa-icon",23),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",24),t.TgZ(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA(),t.qZA(),t._UZ(19,"mat-progress-bar",25),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.xp6(1),t.AsE("",t.Dn7(3,9,(null==e?null:e.alias)||(null==e?null:e.shortChannelId),0,24),"",((null==e?null:e.alias)||(null==e?null:e.shortChannelId)).length>25?"...":"",""),t.xp6(6),t.hij("",t.xi3(9,13,(null==e?null:e.toLocal)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",i.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,16,(null==e?null:e.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,18,(null==e?null:e.toRemote)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function zt(n,a){if(1&n&&(t.TgZ(0,"div",17),t.YNc(1,Bt,20,21,"div",18),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}function Vt(n,a){if(1&n&&(t.TgZ(0,"div",3),t.TgZ(1,"div",4),t.TgZ(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"div",6),t.TgZ(5,"mat-hint",7),t.TgZ(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",9),t._UZ(11,"fa-icon",10),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",11),t.TgZ(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA(),t.qZA(),t._UZ(19,"mat-progress-bar",12),t.qZA(),t.TgZ(20,"div",13),t._UZ(21,"mat-divider",14),t.qZA(),t.TgZ(22,"div",15),t.YNc(23,zt,2,1,"div",16),t.qZA(),t.qZA()),2&n){const e=t.oxw(),i=t.MAs(2);t.xp6(8),t.hij("",t.xi3(9,7,(null==e.channelBalances?null:e.channelBalances.localBalance)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",e.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,12,(null==e.channelBalances?null:e.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("value",null!=e.channelBalances&&e.channelBalances.localBalance&&(null==e.channelBalances?null:e.channelBalances.localBalance)>0?+(null==e.channelBalances?null:e.channelBalances.localBalance)/(+(null==e.channelBalances?null:e.channelBalances.localBalance)+ +(null==e.channelBalances?null:e.channelBalances.remoteBalance))*100:0),t.xp6(4),t.Q6J("ngIf",e.allChannels&&(null==e.allChannels?null:e.allChannels.length)>0)("ngIfElse",i)}}function Gt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",26),t._uU(1," No channels available. "),t.TgZ(2,"button",27),t.NdJ("click",function(){return t.CHM(e),t.oxw().goToChannels()}),t._uU(3,"Open Channel"),t.qZA(),t.qZA()}}function Xt(n,a){if(1&n&&(t.TgZ(0,"div",28),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let $t=(()=>{class n{constructor(e){this.router=e,this.faBalanceScale=Z.DL8,this.faDumbbell=Z.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,Vt,24,15,"div",0),t.YNc(1,Gt,4,0,"ng-template",null,1,t.W1O),t.YNc(3,Xt,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,x.bx,I.BN,z.gM,M.pW,G.d,Y.$V,u.sg,q.lW],pipes:[u.JJ,u.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function Wt(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div",3),t.TgZ(2,"div"),t.TgZ(3,"h4",4),t._uU(4,"Daily"),t.qZA(),t.TgZ(5,"div",5),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.TgZ(8,"div"),t.TgZ(9,"h4",4),t._uU(10,"Weekly"),t.qZA(),t.TgZ(11,"div",5),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.TgZ(14,"div"),t.TgZ(15,"h4",4),t._uU(16,"Monthly"),t.qZA(),t.TgZ(17,"div",5),t._uU(18),t.ALo(19,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(20,"div",3),t.TgZ(21,"div"),t.TgZ(22,"h4",4),t._uU(23,"Transactions"),t.qZA(),t.TgZ(24,"div",5),t._uU(25),t.ALo(26,"number"),t.qZA(),t.qZA(),t.TgZ(27,"div"),t.TgZ(28,"h4",4),t._uU(29,"Transactions"),t.qZA(),t.TgZ(30,"div",5),t._uU(31),t.ALo(32,"number"),t.qZA(),t.qZA(),t.TgZ(33,"div"),t.TgZ(34,"h4",4),t._uU(35,"Transactions"),t.qZA(),t.TgZ(36,"div",5),t._uU(37),t.ALo(38,"number"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(6),t.hij("",t.lcZ(7,6,null==e.fees?null:e.fees.daily_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(13,8,null==e.fees?null:e.fees.weekly_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(19,10,null==e.fees?null:e.fees.monthly_fee)," Sats"),t.xp6(7),t.Oqu(t.lcZ(26,12,null==e.fees?null:e.fees.daily_txs)),t.xp6(6),t.Oqu(t.lcZ(32,14,null==e.fees?null:e.fees.weekly_txs)),t.xp6(6),t.Oqu(t.lcZ(38,16,null==e.fees?null:e.fees.monthly_txs))}}function Kt(n,a){if(1&n&&(t.TgZ(0,"div",6),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let jt=(()=>{class n{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){var e;if(null===(e=this.fees)||void 0===e?void 0:e.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}];const i=Math.ceil(Math.log(this.fees.monthly_fee+1)/Math.LN10),o=Math.pow(10,i-1);this.maxFeeValue=Math.ceil(this.fees.monthly_fee/o)*o/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 n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},features:[t.TTD],decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,Wt,39,18,"div",0),t.YNc(1,Kt,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function te(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div",3),t.TgZ(2,"div"),t.TgZ(3,"h4",4),t._uU(4,"Active"),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"span",6),t._uU(7),t.ALo(8,"number"),t.qZA(),t.qZA(),t.TgZ(9,"div"),t.TgZ(10,"h4",4),t._uU(11,"Pending"),t.qZA(),t.TgZ(12,"div",5),t._UZ(13,"span",7),t._uU(14),t.ALo(15,"number"),t.qZA(),t.qZA(),t.TgZ(16,"div"),t.TgZ(17,"h4",4),t._uU(18,"Inactive"),t.qZA(),t.TgZ(19,"div",5),t._UZ(20,"span",8),t._uU(21),t.ALo(22,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(23,"div",3),t.TgZ(24,"div"),t.TgZ(25,"h4",4),t._uU(26,"Capacity"),t.qZA(),t.TgZ(27,"div",5),t._uU(28),t.ALo(29,"number"),t.qZA(),t.qZA(),t.TgZ(30,"div"),t.TgZ(31,"h4",4),t._uU(32,"Capacity"),t.qZA(),t.TgZ(33,"div",5),t._uU(34),t.ALo(35,"number"),t.qZA(),t.qZA(),t.TgZ(36,"div"),t.TgZ(37,"h4",4),t._uU(38,"Capacity"),t.qZA(),t.TgZ(39,"div",5),t._uU(40),t.ALo(41,"number"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(7),t.Oqu(t.lcZ(8,6,(null==e.channelsStatus.active?null:e.channelsStatus.active.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(15,8,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(22,10,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.channels)||0)),t.xp6(7),t.hij("",t.lcZ(29,12,(null==e.channelsStatus.active?null:e.channelsStatus.active.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(35,14,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(41,16,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.capacity)||0)," Sats")}}function ee(n,a){if(1&n&&(t.TgZ(0,"div",9),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let ne=(()=>{class n{constructor(){this.channelsStatus={}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,te,42,18,"div",0),t.YNc(1,ee,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function ie(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19),t.TgZ(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toRemote||0,"1.0-0")," Sats")}}function ae(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19),t.TgZ(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toLocal||0,"1.0-0")," Sats")}}function oe(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toRemote||0)/i.totalLiquidity*100:0)}}function se(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toLocal||0)/i.totalLiquidity*100:0)}}function le(n,a){if(1&n&&(t.TgZ(0,"div",14),t.TgZ(1,"span",15),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",16),t.YNc(5,ie,5,4,"mat-hint",17),t.YNc(6,ae,5,4,"mat-hint",17),t.qZA(),t.YNc(7,oe,1,1,"mat-progress-bar",18),t.YNc(8,se,1,1,"mat-progress-bar",18),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.xp6(1),t.AsE("",t.Dn7(3,8,e.alias||e.shortChannelId,0,24),"",(e.alias||e.shortChannelId).length>25?"...":"",""),t.xp6(3),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction),t.xp6(1),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction)}}function re(n,a){if(1&n&&(t.TgZ(0,"div",12),t.YNc(1,le,9,12,"div",13),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}const ce=function(n,a,e){return{"mb-4":n,"mb-2":a,"mb-1":e}};function ue(n,a){if(1&n&&(t.TgZ(0,"div",3),t.TgZ(1,"div",4),t.TgZ(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"mat-hint",6),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",7),t.qZA(),t.TgZ(8,"div",8),t._UZ(9,"mat-divider",9),t.qZA(),t.TgZ(10,"div",10),t.YNc(11,re,2,1,"div",11),t.qZA(),t.qZA()),2&n){const e=t.oxw(),i=t.MAs(2);t.Q6J("ngClass",t.kEZ(7,ce,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)),t.xp6(5),t.hij("",t.xi3(6,4,e.totalLiquidity,"1.0-0")," Sats"),t.xp6(6),t.Q6J("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",i)}}function pe(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).goToChannels()}),t._uU(1,"Open Channel"),t.qZA()}}function me(n,a){if(1&n&&(t.TgZ(0,"div",22),t._uU(1," No channels available. "),t.YNc(2,pe,2,0,"button",23),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf","Out"===e.direction)}}function de(n,a){if(1&n&&(t.TgZ(0,"div",25),t.TgZ(1,"p"),t._uU(2),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let he=(()=>{class n{constructor(e,i){this.router=e,this.commonService=i,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["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"],["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"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(e,i){if(1&e&&(t.YNc(0,ue,12,11,"div",0),t.YNc(1,me,3,1,"ng-template",null,1,t.W1O),t.YNc(3,de,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,u.mk,S.oO,x.bx,M.pW,G.d,Y.$V,u.sg,z.gM,q.lW],pipes:[u.JJ,u.OU],styles:[""]}),n})();var N=g(2605),J=g(181),L=g(8977),T=g(2262),r=g(4176),D=g(5304),O=g(4050),B=g(6309),m=g(9133),U=g(138),X=g(266),$=g(4786),k=g(6400),Q=g(6731);function ge(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function fe(n,a){if(1&n&&(t.TgZ(0,"mat-option",25),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(t.lcZ(2,2,e))}}function _e(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.invoiceError)}}function Ce(n,a){if(1&n&&(t.TgZ(0,"div",26),t._UZ(1,"fa-icon",27),t.YNc(2,_e,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.invoiceError)}}let xe=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.decimalPipe=s,this.commonService=c,this.actions=f,this.faExclamationTriangle=Z.eHv,this.selNode={},this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.timeUnitEnum=l.Qk,this.timeUnits=l.LO,this.selTimeUnit=l.Qk.SECS,this.invoiceError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.actions.pipe((0,h.R)(this.unSubs[2]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&"CreateInvoice"===e.payload.action&&(e.payload.status===l.Bn.ERROR&&(this.invoiceError=e.payload.message),e.payload.status===l.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(e){if(this.invoiceError="",!this.description)return!0;let i=this.expiry?this.expiry:3600;this.selTimeUnit!==l.Qk.SECS&&(i=this.commonService.convertTime(this.expiry,this.selTimeUnit,l.Qk.SECS));let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,O.Z$)({payload:o}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}onTimeUnitChange(e){this.expiry&&this.selTimeUnit!==e.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,e.value)),this.selTimeUnit=e.value}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(b.yh),t.Y36(u.JJ),t.Y36(F.v),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-create-invoices"]],decls:35,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-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(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Create Invoice"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"input",10),t.NdJ("ngModelChange",function(c){return i.description=c}),t.qZA(),t.YNc(13,ge,2,0,"mat-error",11),t.qZA(),t.TgZ(14,"div",12),t.TgZ(15,"mat-form-field",13),t.TgZ(16,"input",14),t.NdJ("ngModelChange",function(c){return i.invoiceValue=c})("keyup",function(){return i.onInvoiceValueChange()}),t.qZA(),t.TgZ(17,"span",15),t._uU(18," Sats "),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.qZA(),t.qZA(),t.TgZ(21,"mat-form-field",16),t.TgZ(22,"input",17),t.NdJ("ngModelChange",function(c){return i.expiry=c}),t.qZA(),t.TgZ(23,"span",15),t._uU(24),t.ALo(25,"titlecase"),t.qZA(),t.qZA(),t.TgZ(26,"mat-form-field",18),t.TgZ(27,"mat-select",19),t.NdJ("selectionChange",function(c){return i.onTimeUnitChange(c)}),t.YNc(28,fe,3,4,"mat-option",20),t.qZA(),t.qZA(),t.qZA(),t.YNc(29,Ce,3,2,"div",21),t.TgZ(30,"div",22),t.TgZ(31,"button",23),t.NdJ("click",function(){return i.resetData()}),t._uU(32,"Clear Field"),t.qZA(),t.TgZ(33,"button",24),t.NdJ("click",function(){t.CHM(o);const c=t.MAs(10);return i.onAddInvoice(c)}),t._uU(34,"Create Invoice"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.description),t.xp6(1),t.Q6J("ngIf",!i.description),t.xp6(3),t.Q6J("ngModel",i.invoiceValue)("step",100)("min",1),t.xp6(4),t.Oqu(i.invoiceValueHint),t.xp6(2),t.Q6J("ngModel",i.expiry)("step",i.selTimeUnit===i.timeUnitEnum.SECS?300:i.selTimeUnit===i.timeUnitEnum.MINS?10:i.selTimeUnit===i.timeUnitEnum.HOURS?2:1)("min",1),t.xp6(2),t.hij(" ",t.lcZ(25,14,i.selTimeUnit)," "),t.xp6(3),t.Q6J("value",i.selTimeUnit),t.xp6(1),t.Q6J("ngForOf",i.timeUnits),t.xp6(1),t.Q6J("ngIf",""!==i.invoiceError))},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,D.ZT,A.dn,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,m.wV,m.qQ,$.q,x.R9,x.bx,k.gD,u.sg,x.TO,Q.ey,I.BN],pipes:[u.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var ye=g(8468),v=g(4097);function Ze(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function Te(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5),t.TgZ(2,"mat-form-field",6),t.TgZ(3,"input",7),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().description=o}),t.qZA(),t.YNc(4,Ze,2,0,"mat-error",8),t.qZA(),t.TgZ(5,"mat-form-field",9),t.TgZ(6,"input",10,11),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().invoiceValue=o})("keyup",function(){return t.CHM(e),t.oxw().onInvoiceValueChange()}),t.qZA(),t.TgZ(8,"span",12),t._uU(9," Sats "),t.qZA(),t.TgZ(10,"mat-hint"),t._uU(11),t.qZA(),t.qZA(),t.TgZ(12,"div",13),t.TgZ(13,"button",14),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(14,"Clear Field"),t.qZA(),t.TgZ(15,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.MAs(1);return t.oxw().onAddInvoice(o)}),t._uU(16,"Create Invoice"),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.description),t.xp6(1),t.Q6J("ngIf",!e.description),t.xp6(2),t.Q6J("ngModel",e.invoiceValue)("step",100)("min",1),t.xp6(5),t.Oqu(e.invoiceValueHint)}}function Ae(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",16),t.TgZ(1,"button",17),t.NdJ("click",function(){return t.CHM(e),t.oxw().openCreateInvoiceModal()}),t._uU(2,"Create Invoice"),t.qZA(),t.qZA()}}function Le(n,a){1&n&&t._UZ(0,"mat-progress-bar",47)}function ve(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Created "),t.qZA())}const nt=function(n){return{"mr-0":n}};function be(n,a){if(1&n&&t._UZ(0,"span",53),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,nt,e.screenSize===e.screenSizeEnum.XS))}}function Se(n,a){if(1&n&&t._UZ(0,"span",54),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,nt,e.screenSize===e.screenSizeEnum.XS))}}function we(n,a){if(1&n&&t._UZ(0,"span",55),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,nt,e.screenSize===e.screenSizeEnum.XS))}}function Ee(n,a){if(1&n&&(t.TgZ(0,"td",49),t.YNc(1,be,1,3,"span",50),t.YNc(2,Se,1,3,"span",51),t.YNc(3,we,1,3,"span",52),t._uU(4),t.ALo(5,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","received"===e.status),t.xp6(1),t.Q6J("ngIf","unpaid"===e.status),t.xp6(1),t.Q6J("ngIf",!e.status||"expired"===e.status||"unknown"===e.status),t.xp6(1),t.hij(" ",t.xi3(5,4,1e3*e.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function qe(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Settled "),t.qZA())}function Ie(n,a){if(1&n&&(t.TgZ(0,"td",49),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.receivedAt,"dd/MMM/YYYY HH:mm")||"-")}}function Fe(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Description "),t.qZA())}const Oe=function(n){return{"max-width":n}};function Re(n,a){if(1&n&&(t.TgZ(0,"td",49),t.TgZ(1,"div",56),t.TgZ(2,"span",57),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Oe,i.screenSize===i.screenSizeEnum.XS?"10rem":"32rem")),t.xp6(2),t.Oqu(e.description)}}function Ne(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount (Sats) "),t.qZA())}function ke(n,a){if(1&n&&(t.TgZ(0,"td",59),t.TgZ(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amount?t.xi3(3,1,e.amount,"1.0-0"):"-","")}}function Pe(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount Settled (Sats) "),t.qZA())}function De(n,a){if(1&n&&(t.TgZ(0,"td",59),t.TgZ(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amountSettled?t.xi3(3,1,e.amountSettled,"1.0-0"):"-","")}}function Ue(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",61),t.TgZ(1,"div",62),t.TgZ(2,"mat-select",63),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}const Me=function(n){return{"px-3":n}};function Je(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",65),t.TgZ(1,"div",66),t.TgZ(2,"mat-select",67),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onInvoiceClick(s)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onRefreshInvoice(s)}),t._uU(7,"Refresh"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Me,e.screenSize!==e.screenSizeEnum.XS))}}function Ye(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No invoice available."),t.qZA())}function Qe(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting invoices..."),t.qZA())}function He(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Be(n,a){if(1&n&&(t.TgZ(0,"td",68),t.YNc(1,Ye,2,0,"p",8),t.YNc(2,Qe,2,0,"p",8),t.YNc(3,He,2,1,"p",8),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const ze=function(n){return{"display-none":n}};function Ve(n,a){if(1&n&&t._UZ(0,"tr",69),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,ze,(null==e.invoices?null:e.invoices.data)&&(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)>0))}}function Ge(n,a){1&n&&t._UZ(0,"tr",70)}function Xe(n,a){1&n&&t._UZ(0,"tr",71)}const $e=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},We=function(){return["no_invoice"]};function Ke(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",18),t.TgZ(1,"div",19),t.TgZ(2,"div",20),t._UZ(3,"fa-icon",21),t.TgZ(4,"span",22),t._uU(5,"Invoices History"),t.qZA(),t.qZA(),t.TgZ(6,"mat-form-field",23),t.TgZ(7,"input",24),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",25),t.YNc(9,Le,1,0,"mat-progress-bar",26),t.TgZ(10,"table",27,28),t.ynx(12,29),t.YNc(13,ve,2,0,"th",30),t.YNc(14,Ee,6,7,"td",31),t.BQk(),t.ynx(15,32),t.YNc(16,qe,2,0,"th",30),t.YNc(17,Ie,3,4,"td",31),t.BQk(),t.ynx(18,33),t.YNc(19,Fe,2,0,"th",30),t.YNc(20,Re,4,4,"td",31),t.BQk(),t.ynx(21,34),t.YNc(22,Ne,2,0,"th",35),t.YNc(23,ke,4,4,"td",36),t.BQk(),t.ynx(24,37),t.YNc(25,Pe,2,0,"th",35),t.YNc(26,De,4,4,"td",36),t.BQk(),t.ynx(27,38),t.YNc(28,Ue,6,0,"th",39),t.YNc(29,Je,8,3,"td",40),t.BQk(),t.ynx(30,41),t.YNc(31,Be,4,3,"td",42),t.BQk(),t.YNc(32,Ve,1,3,"tr",43),t.YNc(33,Ge,1,0,"tr",44),t.YNc(34,Xe,1,0,"tr",45),t.qZA(),t.qZA(),t._UZ(35,"mat-paginator",46),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.invoices)("ngClass",t.VKq(12,$e,""!==e.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,We)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let dt=(()=>{class n{constructor(e,i,o,s,c,f){this.logger=e,this.store=i,this.decimalPipe=o,this.commonService=s,this.datePipe=c,this.actions=f,this.calledFrom="transactions",this.faHistory=Z.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.selFilter="",this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","amountSettled","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","receivedAt","description","amount","amountSettled","actions"])}ngOnInit(){this.store.select(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Ef).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.invoiceJSONArr=e.invoices&&e.invoices.length>0?e.invoices:[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SET_LOOKUP_ECL&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&e.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(e.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,v.qR)({payload:{data:{pageSize:this.pageSize,component:xe}}}))}onAddInvoice(e){if(!this.description)return!0;const i=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue;let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,O.Z$)({payload:o})),this.resetData()}onInvoiceClick(e){this.store.dispatch((0,v.qR)({payload:{data:{invoice:e,newlyAdded:!1,component:ye.R}}}))}onRefreshInvoice(e){this.store.dispatch((0,O.n7)({payload:e.paymentHash}))}updateInvoicesData(e){this.invoiceJSONArr=this.invoiceJSONArr.map(i=>i.paymentHash===e.paymentHash?e:i)}loadInvoicesTable(e){this.invoices=new r.by(e?[...e]:[]),this.invoices.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.invoices.paginator=this.paginator,this.applyFilter()}resetData(){this.description="",this.invoiceValue=null,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[4])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(u.JJ),t.Y36(F.v),t.Y36(u.uU),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-invoices"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",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-1",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/Unknown","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/Unknown","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"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Te,17,6,"form",1),t.YNc(2,Ae,3,0,"div",2),t.YNc(3,Ke,36,15,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,m.wV,m.qQ,$.q,x.R9,x.bx,q.lW,x.TO,I.BN,Y.$V,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,z.gM,u.PC,S.Zl,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],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}"]}),n})();var H=g(3453),it=g(9552),ht=g(8020);const je=["paymentReq"];function tn(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function en(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function nn(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function an(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment amount is required."),t.qZA())}function on(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1),t.TgZ(1,"input",17,18),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().paymentAmount=o})("change",function(o){return t.CHM(e),t.oxw().onAmountChange(o)}),t.qZA(),t.TgZ(3,"mat-hint"),t._uU(4,"It is a zero amount invoice, enter amount to be paid."),t.qZA(),t.YNc(5,an,2,0,"mat-error",11),t.qZA()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.paymentAmount),t.xp6(4),t.Q6J("ngIf",!e.paymentAmount)}}function sn(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentError)}}function ln(n,a){if(1&n&&(t.TgZ(0,"div",19),t._UZ(1,"fa-icon",20),t.YNc(2,sn,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.paymentError)}}let rn=(()=>{class n{constructor(e,i,o,s,c,f,P,C){this.dialogRef=e,this.store=i,this.eclEffects=o,this.logger=s,this.commonService=c,this.decimalPipe=f,this.actions=P,this.dataService=C,this.faExclamationTriangle=Z.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.feeLimitTypes=l.Vc,this.paymentError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activeChannels=e.activeChannels,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_PAYMENT_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SEND_PAYMENT_STATUS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"SendPayment"===e.payload.action&&(delete this.paymentDecoded.amount,this.paymentError=e.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((0,H.q)(1)).subscribe({next:e=>{this.paymentDecoded=e,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.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+i.symbol+this.decimalPipe.transform(i.OTHER?i.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:e=>{this.logger.error(e),this.paymentDecodedHint="ERROR: "+(e.message?e.message:"string"==typeof e?e:JSON.stringify(e)),this.paymentReq.control.setErrors({decodeError:!0})}}))}sendPayment(){this.store.dispatch((0,O.oV)(this.zeroAmtInvoice?{payload:{invoice:this.paymentRequest,amountMsat:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{invoice:this.paymentRequest,fromDialog:!0}}))}onPaymentRequestEntry(e){this.paymentRequest=e&&"string"==typeof e?e.trim():e,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((0,H.q)(1)).subscribe({next:i=>{this.paymentDecoded=i,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.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:i=>{this.logger.error(i),this.paymentDecodedHint="ERROR: "+(i.message?i.message:"string"==typeof i?i:JSON.stringify(i)),this.paymentReq.control.setErrors({decodeError:!0})}}))}onAmountChange(e){delete this.paymentDecoded.amount,this.paymentDecoded.amount=e}resetData(){this.paymentDecoded={},this.paymentRequest="",this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(b.yh),t.Y36(it.o),t.Y36(R.mQ),t.Y36(F.v),t.Y36(u.JJ),t.Y36(B.eX),t.Y36(ht.D))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-send-payments"]],viewQuery:function(e,i){if(1&e&&t.Gf(je,5),2&e){let o;t.iGM(o=t.CRH())&&(i.paymentReq=o.first)}},decls:24,vars:7,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","rows","4","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-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-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(e,i){if(1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Send Payment"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.TgZ(11,"mat-form-field",1),t.TgZ(12,"textarea",9,10),t.NdJ("ngModelChange",function(s){return i.onPaymentRequestEntry(s)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(14,tn,2,1,"mat-hint",11),t.YNc(15,en,2,0,"mat-error",11),t.YNc(16,nn,2,1,"mat-error",11),t.qZA(),t.YNc(17,on,6,2,"mat-form-field",12),t.YNc(18,ln,3,2,"div",13),t.TgZ(19,"div",14),t.TgZ(20,"button",15),t.NdJ("click",function(){return i.resetData()}),t._uU(21,"Clear Fields"),t.qZA(),t.TgZ(22,"button",16),t.NdJ("click",function(){return i.onSendPayment()}),t._uU(23,"Send Payment"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e){const o=t.MAs(13);t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.paymentRequest),t.xp6(2),t.Q6J("ngIf",i.paymentRequest&&""!==i.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!i.paymentRequest),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.decodeError),t.xp6(1),t.Q6J("ngIf",i.zeroAmtInvoice),t.xp6(1),t.Q6J("ngIf",""!==i.paymentError)}},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,D.ZT,A.dn,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,x.bx,x.TO,I.BN],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}"]}),n})();var V=g(3050);const cn=["scrollContainer"];function un(n,a){if(1&n&&(t.TgZ(0,"div",9),t.TgZ(1,"div",1),t.TgZ(2,"h4",11),t._uU(3,"Description"),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(5),t.Oqu(e.description)}}function pn(n,a){1&n&&t._UZ(0,"mat-divider",14)}function mn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-expansion-panel",23),t.NdJ("opened",function(){return t.CHM(e),t.oxw().onExpansionOpen(!0)})("closed",function(){return t.CHM(e),t.oxw().onExpansionOpen(!1)}),t.TgZ(1,"mat-expansion-panel-header"),t.TgZ(2,"mat-panel-title"),t.TgZ(3,"h4",24),t._uU(4),t.qZA(),t.TgZ(5,"h4",25),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",8),t.TgZ(9,"div",9),t.TgZ(10,"div",26),t.TgZ(11,"h4",11),t._uU(12,"Fees (mSats)"),t.qZA(),t.TgZ(13,"span",12),t._uU(14),t.ALo(15,"number"),t.qZA(),t.qZA(),t.TgZ(16,"div",26),t.TgZ(17,"h4",11),t._uU(18,"Date/Time"),t.qZA(),t.TgZ(19,"span",12),t._uU(20),t.ALo(21,"date"),t.qZA(),t.qZA(),t.qZA(),t._UZ(22,"mat-divider",14),t.TgZ(23,"div",9),t.TgZ(24,"div",1),t.TgZ(25,"h4",11),t._uU(26,"ID"),t.qZA(),t.TgZ(27,"span",27),t._uU(28),t.qZA(),t.qZA(),t.qZA(),t._UZ(29,"mat-divider",14),t.TgZ(30,"div",9),t.TgZ(31,"div",1),t.TgZ(32,"h4",11),t._uU(33,"To Channel"),t.qZA(),t.TgZ(34,"span",27),t._uU(35),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit,i=a.index,o=t.oxw();t.Q6J("expanded",o.expansionOpen),t.xp6(4),t.hij("Part ",i+1,""),t.xp6(2),t.hij("",t.lcZ(7,7,e.amount)," (Sats)"),t.xp6(8),t.Oqu(t.lcZ(15,9,e.feesPaid)),t.xp6(6),t.Oqu(t.xi3(21,11,e.timestamp,"dd/MMM/YYYY HH:mm")),t.xp6(8),t.Oqu(e.id),t.xp6(7),t.Oqu(e.toChannelAlias)}}let dn=(()=>{class n{constructor(e,i){this.dialogRef=e,this.data=i,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(e){this.expansionOpen=e}onClose(){this.dialogRef.close(!1)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-payment-information"]],viewQuery:function(e,i){if(1&e&&t.Gf(cn,5),2&e){let o;t.iGM(o=t.CRH())&&(i.scrollContainer=o.first)}},decls:66,vars:15,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["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,"h-40","padding-gap-x-large",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"],["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","padding-gap-x-large"],["mat-mini-fab","","aria-label","Scroll Down","fxLayoutAlign","center center",3,"click"],["fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",1,"padding-gap-x-large","padding-gap-bottom-large"],["fxLayoutAlign","center center","tabindex","1","mat-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Payment Information"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6,7),t.TgZ(10,"div",8),t.TgZ(11,"div",9),t.TgZ(12,"div",10),t.TgZ(13,"h4",11),t._uU(14,"Amount (Sats)"),t.qZA(),t.TgZ(15,"span",12),t._uU(16),t.ALo(17,"number"),t.qZA(),t.qZA(),t.TgZ(18,"div",13),t.TgZ(19,"h4",11),t._uU(20,"Date/Time"),t.qZA(),t.TgZ(21,"span",12),t._uU(22),t.ALo(23,"date"),t.qZA(),t.qZA(),t.qZA(),t._UZ(24,"mat-divider",14),t.TgZ(25,"div",9),t.TgZ(26,"div",1),t.TgZ(27,"h4",11),t._uU(28,"ID"),t.qZA(),t.TgZ(29,"span",12),t._uU(30),t.qZA(),t.qZA(),t.qZA(),t._UZ(31,"mat-divider",14),t.TgZ(32,"div",9),t.TgZ(33,"div",1),t.TgZ(34,"h4",11),t._uU(35,"Payment Hash"),t.qZA(),t.TgZ(36,"span",12),t._uU(37),t.qZA(),t.qZA(),t.qZA(),t._UZ(38,"mat-divider",14),t.TgZ(39,"div",9),t.TgZ(40,"div",1),t.TgZ(41,"h4",11),t._uU(42,"Payment Preimage"),t.qZA(),t.TgZ(43,"span",12),t._uU(44),t.qZA(),t.qZA(),t.qZA(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9),t.TgZ(47,"div",1),t.TgZ(48,"h4",11),t._uU(49,"Recipient Node"),t.qZA(),t.TgZ(50,"span",12),t._uU(51),t.qZA(),t.qZA(),t.qZA(),t._UZ(52,"mat-divider",14),t.YNc(53,un,6,1,"div",15),t.YNc(54,pn,1,0,"mat-divider",16),t.TgZ(55,"div",9),t.TgZ(56,"div",1),t.TgZ(57,"mat-accordion"),t.YNc(58,mn,36,14,"mat-expansion-panel",17),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(59,"div",18),t.TgZ(60,"button",19),t.NdJ("click",function(){return i.onScrollDown()}),t.TgZ(61,"mat-icon",20),t._uU(62,"arrow_downward"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(63,"div",21),t.TgZ(64,"button",22),t._uU(65,"OK"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(16),t.Oqu(t.lcZ(17,10,i.payment.recipientAmount)),t.xp6(6),t.Oqu(t.xi3(23,12,i.payment.firstPartTimestamp,"dd/MMM/YYYY HH:mm")),t.xp6(8),t.Oqu(i.payment.id),t.xp6(7),t.Oqu(i.payment.paymentHash),t.xp6(7),t.Oqu(i.payment.paymentPreimage),t.xp6(7),t.Oqu(i.payment.recipientNodeAlias),t.xp6(2),t.Q6J("ngIf",i.description),t.xp6(1),t.Q6J("ngIf",i.description),t.xp6(4),t.Q6J("ngForOf",i.payment.parts),t.xp6(6),t.Q6J("mat-dialog-close",!1))},directives:[p.xw,p.Wh,p.yH,A.dk,q.lW,A.dn,Y.$V,G.d,u.O5,V.pp,u.sg,pt.Hw,D.ZT,V.ib,V.yz,V.yK],pipes:[u.JJ,u.uU],styles:[""]}),n})();var K=g(6718);const hn=["sendPaymentForm"];function gn(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function fn(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function _n(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5),t.TgZ(2,"mat-form-field",6),t.TgZ(3,"textarea",7,8),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(5,gn,2,1,"mat-hint",9),t.YNc(6,fn,2,0,"mat-error",9),t.qZA(),t.TgZ(7,"div",10),t.TgZ(8,"button",11),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(9,"Clear Field"),t.qZA(),t.TgZ(10,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSendPayment()}),t._uU(11,"Send Payment"),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.paymentRequest),t.xp6(2),t.Q6J("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!e.paymentRequest)}}function Cn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",13),t.TgZ(1,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().openSendPaymentModal()}),t._uU(2,"Send Payment"),t.qZA(),t.qZA()}}function xn(n,a){1&n&&t._UZ(0,"mat-progress-bar",48)}function yn(n,a){1&n&&(t.TgZ(0,"th",49),t._uU(1,"Date/Time"),t.qZA())}function Zn(n,a){if(1&n&&(t.TgZ(0,"td",50),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,null==e?null:e.firstPartTimestamp,"dd/MMM/YYYY HH:mm"))}}function Tn(n,a){1&n&&(t.TgZ(0,"th",49),t._uU(1,"ID"),t.qZA())}const W=function(n){return{"max-width":n}};function An(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",51),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function Ln(n,a){1&n&&(t.TgZ(0,"th",49),t._uU(1,"Destination"),t.qZA())}function vn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",51),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.recipientNodeAlias)}}function bn(n,a){1&n&&(t.TgZ(0,"th",53),t._uU(1,"Amount (Sats)"),t.qZA())}function Sn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"span",54),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.recipientAmount))}}function wn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",55),t.TgZ(1,"div",56),t.TgZ(2,"mat-select",57),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function En(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",59),t.TgZ(1,"button",60),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onPaymentClick(s)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function qn(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No payment available."),t.qZA())}function In(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting payments..."),t.qZA())}function Fn(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function On(n,a){if(1&n&&(t.TgZ(0,"td",61),t.YNc(1,qn,2,0,"p",9),t.YNc(2,In,2,0,"p",9),t.YNc(3,Fn,2,1,"p",9),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function Rn(n,a){if(1&n&&(t.TgZ(0,"span",64),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function Nn(n,a){if(1&n&&(t.ynx(0),t.YNc(1,Rn,3,4,"span",63),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function kn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"span",62),t._uU(2),t.qZA(),t.YNc(3,Nn,2,1,"ng-container",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" Total Attempts: ",null==e||null==e.parts?null:e.parts.length," "),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Pn(n,a){if(1&n&&(t.TgZ(0,"span",62),t.TgZ(1,"span",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function Dn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Pn,4,4,"span",66),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Un(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Dn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Mn(n,a){if(1&n&&(t.TgZ(0,"span",62),t.TgZ(1,"span",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.toChannelAlias)}}function Jn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Mn,4,4,"span",66),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Yn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"div",65),t.TgZ(2,"span",52),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Jn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(null==e?null:e.recipientNodeAlias),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Qn(n,a){if(1&n&&(t.TgZ(0,"span",67),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.amount,"1.0-0")," ")}}function Hn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Qn,3,4,"span",68),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Bn(n,a){if(1&n&&(t.TgZ(0,"td",50),t.TgZ(1,"span",67),t._uU(2),t.ALo(3,"number"),t.qZA(),t.YNc(4,Hn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.xi3(3,2,null==e?null:e.recipientAmount,"1.0-0")),t.xp6(2),t.Q6J("ngIf",e.is_expanded)}}function zn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",70),t.TgZ(1,"button",73),t.NdJ("click",function(){const s=t.CHM(e).$implicit,c=t.oxw(2).$implicit;return t.oxw(2).onPartClick(s,c)}),t._uU(2),t.qZA(),t.qZA()}if(2&n){const e=a.index;t.xp6(2),t.hij("View ",e+1,"")}}function Vn(n,a){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,zn,3,1,"div",72),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Gn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",69),t.TgZ(1,"span",70),t.TgZ(2,"button",71),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return s.is_expanded=!s.is_expanded}),t._uU(3),t.qZA(),t.qZA(),t.YNc(4,Vn,2,1,"div",9),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(3),t.Oqu(e.is_expanded?"Hide":"Show"),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Xn(n,a){1&n&&t._UZ(0,"tr",74)}const $n=function(n){return{"display-none":n}};function Wn(n,a){if(1&n&&t._UZ(0,"tr",75),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,$n,(null==e.payments?null:e.payments.data)&&(null==e.payments||null==e.payments.data?null:e.payments.data.length)>0))}}function Kn(n,a){1&n&&t._UZ(0,"tr",76)}function jn(n,a){1&n&&t._UZ(0,"tr",74)}const ti=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},ei=function(){return["no_payment"]};function ni(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",14),t.TgZ(1,"div",15),t.TgZ(2,"div",16),t._UZ(3,"fa-icon",17),t.TgZ(4,"span",18),t._uU(5,"Payments History"),t.qZA(),t.qZA(),t.TgZ(6,"mat-form-field",19),t.TgZ(7,"input",20),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",21),t.YNc(9,xn,1,0,"mat-progress-bar",22),t.TgZ(10,"table",23,24),t.ynx(12,25),t.YNc(13,yn,2,0,"th",26),t.YNc(14,Zn,3,4,"td",27),t.BQk(),t.ynx(15,28),t.YNc(16,Tn,2,0,"th",26),t.YNc(17,An,4,4,"td",27),t.BQk(),t.ynx(18,29),t.YNc(19,Ln,2,0,"th",26),t.YNc(20,vn,4,4,"td",27),t.BQk(),t.ynx(21,30),t.YNc(22,bn,2,0,"th",31),t.YNc(23,Sn,4,3,"td",27),t.BQk(),t.ynx(24,32),t.YNc(25,wn,6,0,"th",33),t.YNc(26,En,3,0,"td",34),t.BQk(),t.ynx(27,35),t.YNc(28,On,4,3,"td",36),t.BQk(),t.ynx(29,37),t.YNc(30,kn,4,2,"td",27),t.BQk(),t.ynx(31,38),t.YNc(32,Un,5,5,"td",27),t.BQk(),t.ynx(33,39),t.YNc(34,Yn,5,5,"td",27),t.BQk(),t.ynx(35,40),t.YNc(36,Bn,5,5,"td",27),t.BQk(),t.ynx(37,41),t.YNc(38,Gn,5,2,"td",42),t.BQk(),t.YNc(39,Xn,1,0,"tr",43),t.YNc(40,Wn,1,3,"tr",44),t.YNc(41,Kn,1,0,"tr",45),t.YNc(42,jn,1,0,"tr",46),t.qZA(),t.qZA(),t._UZ(43,"mat-paginator",47),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.payments)("ngClass",t.VKq(14,ti,""!==e.errorMessage)),t.xp6(29),t.Q6J("matRowDefColumns",e.partColumns)("matRowDefWhen",e.is_group),t.xp6(1),t.Q6J("matFooterRowDef",t.DdM(16,ei)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let gt=(()=>{class n{constructor(e,i,o,s,c,f,P){this.logger=e,this.commonService=i,this.store=o,this.rtlEffects=s,this.decimalPipe=c,this.dataService=f,this.datePipe=P,this.calledFrom="transactions",this.faHistory=Z.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.paymentDecoded={},this.displayedColumns=[],this.partColumns=[],this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","actions"],this.partColumns=["groupTotal","groupAction"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","recipientAmount","actions"],this.partColumns=["groupTotal","groupAmount","groupAction"]):this.screenSize===l.cu.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(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.PP).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paymentJSONArr=e.payments&&e.payments.sent&&e.payments.sent.length>0?e.payments.sent:[],this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(e)})}ngAfterViewInit(){this.loadPaymentsTable(this.paymentJSONArr)}loadPaymentsTable(e){this.payments=new r.by(e?[...e]:[]),this.payments.sort=this.sort,this.payments.sortingDataAccessor=(i,o)=>{switch(o){case"firstPartTimestamp":return this.commonService.sortByKey(i.parts,"timestamp","number",this.sort.direction),i.firstPartTimestamp;case"id":return this.commonService.sortByKey(i.parts,"id","string",this.sort.direction),i.id;case"recipientNodeAlias":return this.commonService.sortByKey(i.parts,"toChannelAlias","string",this.sort.direction),i.recipientNodeAlias;case"recipientAmount":return this.commonService.sortByKey(i.parts,"amount","number",this.sort.direction),i.recipientAmount;default:return i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null}},this.payments.filterPredicate=(i,o)=>((i.firstPartTimestamp?this.datePipe.transform(new Date(i.firstPartTimestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.payments.paginator=this.paginator,this.applyFilter()}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,H.q)(1)).subscribe(e=>{this.paymentDecoded=e,this.paymentDecoded.timestamp?(this.paymentDecoded.amount||(this.paymentDecoded.amount=0),this.sendPayment()):this.resetData()})}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.paymentHash,this.paymentDecoded.amount&&0!==this.paymentDecoded.amount?(this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.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:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:50,type:l.Gi.DATE_TIME},{key:"amount",value:this.paymentDecoded.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,H.q)(1)).subscribe(i=>{i&&(this.store.dispatch((0,O.oV)({payload:{invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.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:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:40,type:l.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:l.Gi.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:l.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,H.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.amount=o[0].inputValue,this.store.dispatch((0,O.oV)({payload:{invoice:this.paymentRequest,amountMsat:1e3*o[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(e){this.paymentRequest=e,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,H.q)(1)).subscribe(i=>{this.paymentDecoded=i,this.paymentDecoded.amount?this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="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((0,v.qR)({payload:{data:{component:rn}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}is_group(e,i){return i.parts&&i.parts.length>1}onPaymentClick(e){e.paymentHash&&""!==e.paymentHash.trim()?this.dataService.decodePayments(e.paymentHash).pipe((0,H.q)(1)).subscribe({next:i=>{this.showPaymentView(e,i[0]||[])},error:i=>{this.showPaymentView(e,[])}}):this.showPaymentView(e,[])}showPaymentView(e,i){this.store.dispatch((0,v.qR)({payload:{data:{sentPaymentInfo:i,payment:e,component:dn}}}))}onPartClick(e,i){i.paymentHash&&""!==i.paymentHash.trim()?this.dataService.decodePayments(i.paymentHash).pipe((0,H.q)(1)).subscribe({next:o=>{this.showPartView(e,i,o)},error:o=>{this.showPartView(e,i,[])}}):this.showPartView(e,i,[])}showPartView(e,i,o){const s=[[{key:"paymentHash",value:i.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"paymentPreimage",value:i.paymentPreimage,title:"Payment Preimage",width:100,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"Channel",width:100,type:l.Gi.STRING}],[{key:"id",value:e.id,title:"Part ID",width:50,type:l.Gi.STRING},{key:"timestamp",value:e.timestamp,title:"Time",width:50,type:l.Gi.DATE_TIME}],[{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER},{key:"feesPaid",value:e.feesPaid,title:"Fee (Sats)",width:50,type:l.Gi.NUMBER}]];o.length>0&&o[0].paymentRequest&&o[0].paymentRequest.description&&""!==o[0].paymentRequest.description&&s.splice(3,0,[{key:"description",value:o[0].paymentRequest.description,title:"Description",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Payment Part Information",message:s}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const e=JSON.parse(JSON.stringify(this.payments.data)),i=e.reduce((o,s)=>(s.paymentHash&&""!==s.paymentHash.trim()&&(o=""===o?s.paymentHash:o+","+s.paymentHash),o),"");this.dataService.decodePayments(i).pipe((0,h.R)(this.unSubs[4])).subscribe(o=>{o.forEach((c,f)=>{c.length>0&&c[0].paymentRequest&&c[0].paymentRequest.description&&""!==c[0].paymentRequest.description&&(e[f].description=c[0].paymentRequest.description)});const s=e.reduce((c,f)=>c.concat(f),[]);this.commonService.downloadFile(s,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(K.V),t.Y36(u.JJ),t.Y36(ht.D),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-payments"]],viewQuery:function(e,i){if(1&e&&(t.Gf(hn,5),t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,_n,12,3,"form",1),t.YNc(2,Cn,3,0,"div",2),t.YNc(3,ni,44,17,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,m.Q7,Y.$V,m.JJ,m.On,q.lW,x.bx,x.TO,I.BN,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.nj,r.Ke,r.as,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,k.gD,k.$L,Q.ey,r.yh,u.sg,r.Gk,r.Q2,r.XQ],pipes:[u.uU,u.JJ],styles:[".mat-column-id[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%]{padding:0 1rem;flex:0 0 25%;width:25%}.mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.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}"]}),n})();function ii(n,a){if(1&n&&(t.TgZ(0,"button",26),t.TgZ(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA(),t.qZA()),2&n){t.oxw();const e=t.MAs(11);t.Q6J("matMenuTriggerFor",e)}}function ai(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).onNavigateTo("/ecl/reports")}),t._uU(1,"Fees Summary"),t.qZA()}}function oi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).onsortChannelsBy()}),t._uU(1),t.qZA()}if(2&n){const e=t.oxw(3);t.xp6(1),t.hij("Sort By ","Balance Score"===e.sortField?"Capacity":"Balance Score","")}}function si(n,a){1&n&&t._UZ(0,"mat-progress-bar",27)}function li(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",28),2&n){const e=t.oxw(3);t.Q6J("information",e.information)("showColorFieldSeparately",!1)}}function ri(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",29),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function ci(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-capacity-info",30),2&n){const e=t.oxw(3);t.Q6J("sortBy",e.sortField)("channelBalances",e.channelBalances)("allChannels",e.allChannelsCapacity)("errorMessage",e.errorMessages[2])}}function ui(n,a){if(1&n&&t._UZ(0,"rtl-ecl-fee-info",31),2&n){const e=t.oxw(3);t.Q6J("fees",e.fees)("errorMessage",e.errorMessages[1])}}function pi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-status-info",32),2&n){const e=t.oxw(3);t.Q6J("channelsStatus",e.channelsStatus)("errorMessage",e.errorMessages[2])}}function mi(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const ft=function(n){return{"dashboard-card-content":!0,"error-border":n}};function di(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-grid-tile",8),t.TgZ(1,"mat-card",9),t.TgZ(2,"mat-card-header"),t.TgZ(3,"mat-card-title",10),t.TgZ(4,"div"),t._UZ(5,"fa-icon",11),t.TgZ(6,"span"),t._uU(7),t.qZA(),t.qZA(),t.TgZ(8,"div"),t.YNc(9,ii,3,1,"button",12),t.TgZ(10,"mat-menu",13,14),t.TgZ(12,"button",15),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onNavigateTo(s.link)}),t._uU(13),t.qZA(),t.YNc(14,ai,2,0,"button",16),t.YNc(15,oi,2,1,"button",16),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(16,"mat-card-content",17),t.YNc(17,si,1,0,"mat-progress-bar",18),t.TgZ(18,"div",19),t.YNc(19,li,1,2,"rtl-ecl-node-info",20),t.YNc(20,ri,1,2,"rtl-ecl-balances-info",21),t.YNc(21,ci,1,4,"rtl-ecl-channel-capacity-info",22),t.YNc(22,ui,1,2,"rtl-ecl-fee-info",23),t.YNc(23,pi,1,2,"rtl-ecl-channel-status-info",24),t.YNc(24,mi,2,0,"h3",25),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(5),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.link),t.xp6(4),t.hij("Go To ",e.goTo,""),t.xp6(1),t.Q6J("ngIf","fee"===e.id),t.xp6(1),t.Q6J("ngIf","capacity"===e.id),t.xp6(1),t.s9C("fxFlex","capacity"===e.id?90:70),t.Q6J("ngClass",t.VKq(17,ft,"node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.ERROR)||("capacity"===e.id||"status"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||"fee"===e.id&&i.apiCallStatusFees.status===i.apiCallStatusEnum.ERROR)),t.xp6(1),t.Q6J("ngIf","node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.INITIATED)||("capacity"===e.id||"status"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||"fee"===e.id&&i.apiCallStatusFees.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","capacity"),t.xp6(1),t.Q6J("ngSwitchCase","fee"),t.xp6(1),t.Q6J("ngSwitchCase","status")}}function hi(n,a){if(1&n&&(t.TgZ(0,"div",2),t.TgZ(1,"div",3),t._UZ(2,"fa-icon",4),t.TgZ(3,"span",5),t._uU(4),t.qZA(),t.qZA(),t.TgZ(5,"mat-grid-list",6),t.YNc(6,di,25,19,"mat-grid-tile",7),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("icon",e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.ERROR?e.faFrown:e.faSmile),t.xp6(2),t.Oqu(e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.COMPLETED?"Welcome "+e.information.alias+"! Your node is up and running.":e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),t.xp6(1),t.Q6J("rowHeight",e.operatorCardHeight),t.xp6(1),t.Q6J("ngForOf",e.operatorCards)}}function gi(n,a){if(1&n&&(t.TgZ(0,"button",26),t.TgZ(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA(),t.qZA()),2&n){t.oxw();const e=t.MAs(9);t.Q6J("matMenuTriggerFor",e)}}function fi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-card-header"),t.TgZ(1,"mat-card-title",10),t.TgZ(2,"div"),t._UZ(3,"fa-icon",11),t.TgZ(4,"span"),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"div"),t.YNc(7,gi,3,1,"button",12),t.TgZ(8,"mat-menu",13,41),t.TgZ(10,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw(2).onNavigateTo(o.link)}),t._uU(11),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.link),t.xp6(4),t.hij("Go To ",e.goTo,"")}}function _i(n,a){1&n&&t._UZ(0,"mat-progress-bar",27)}function Ci(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",42),2&n){const e=t.oxw(3);t.Q6J("information",e.information)}}function xi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",29),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function yi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",43),2&n){const e=t.oxw(3);t.Q6J("direction","In")("totalLiquidity",e.totalInboundLiquidity)("allChannels",e.allInboundChannels)("errorMessage",e.errorMessages[2])}}function Zi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",43),2&n){const e=t.oxw(3);t.Q6J("direction","Out")("totalLiquidity",e.totalOutboundLiquidity)("allChannels",e.allOutboundChannels)("errorMessage",e.errorMessages[2])}}function Ti(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",52),t.TgZ(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA(),t.qZA(),t.TgZ(3,"mat-menu",13,53),t.TgZ(5,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2).$implicit;return t.oxw(2).onNavigateTo(o.link)}),t._uU(6),t.qZA(),t.TgZ(7,"button",15),t.NdJ("click",function(){return t.CHM(e),t.oxw(4).onNavigateTo("/ecl/reports/transactions")}),t._uU(8,"Transactions Summary"),t.qZA(),t.qZA()}if(2&n){const e=t.MAs(4),i=t.oxw(2).$implicit;t.Q6J("matMenuTriggerFor",e),t.xp6(6),t.hij("Go To ",i.goTo,"")}}function Ai(n,a){1&n&&(t.TgZ(0,"span",44),t.TgZ(1,"mat-tab-group",45),t.TgZ(2,"mat-tab",46),t._UZ(3,"rtl-ecl-lightning-invoices",47),t.qZA(),t.TgZ(4,"mat-tab",48),t._UZ(5,"rtl-ecl-lightning-payments",49),t.qZA(),t.TgZ(6,"mat-tab",50),t.YNc(7,Ti,9,2,"ng-template",51),t.qZA(),t.qZA(),t.qZA()),2&n&&(t.xp6(3),t.Q6J("calledFrom","home"),t.xp6(2),t.Q6J("calledFrom","home"),t.xp6(1),t.Q6J("disabled",!0))}function Li(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const vi=function(n){return{"p-0":n}};function bi(n,a){if(1&n&&(t.TgZ(0,"mat-grid-tile",8),t.TgZ(1,"mat-card",35),t.YNc(2,fi,12,4,"mat-card-header",36),t.TgZ(3,"mat-card-content",37),t.YNc(4,_i,1,0,"mat-progress-bar",18),t.TgZ(5,"div",19),t.YNc(6,Ci,1,1,"rtl-ecl-node-info",38),t.YNc(7,xi,1,2,"rtl-ecl-balances-info",21),t.YNc(8,yi,1,4,"rtl-ecl-channel-liquidity-info",39),t.YNc(9,Zi,1,4,"rtl-ecl-channel-liquidity-info",39),t.YNc(10,Ai,8,3,"span",40),t.YNc(11,Li,2,0,"h3",25),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(1),t.Q6J("ngClass",t.VKq(13,vi,"transactions"===e.id)),t.xp6(1),t.Q6J("ngIf","transactions"!==e.id),t.xp6(1),t.s9C("fxFlex","transactions"===e.id?100:"balance"===e.id?70:90),t.Q6J("ngClass",t.VKq(15,ft,"node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.ERROR||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.ERROR)||("inboundLiq"===e.id||"outboundLiq"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.ERROR)),t.xp6(1),t.Q6J("ngIf","node"===e.id&&i.apiCallStatusNodeInfo.status===i.apiCallStatusEnum.INITIATED||"balance"===e.id&&(i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED||i.apiCallStatusOCBal.status===i.apiCallStatusEnum.INITIATED)||("inboundLiq"===e.id||"outboundLiq"===e.id)&&i.apiCallStatusAllChannels.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","inboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","outboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","transactions")}}function Si(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",4),t.TgZ(2,"span",5),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"mat-grid-list",34),t.YNc(5,bi,12,17,"mat-grid-tile",7),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faSmile),t.xp6(2),t.hij("Welcome ",e.information.alias,"! Your node is up and running."),t.xp6(1),t.Q6J("rowHeight",e.merchantCardHeight),t.xp6(1),t.Q6J("ngForOf",e.merchantCards)}}let wi=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.commonService=o,this.router=s,this.faSmile=ct.I3,this.faFrown=ct.Kf,this.faAngleDoubleDown=Z.Sbq,this.faAngleDoubleUp=Z.Vfw,this.faChartPie=Z.OS1,this.faBolt=Z.BDt,this.faServer=Z.xf3,this.faNetworkWired=Z.kXW,this.userPersonaEnum=l.ol,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.errorMessages=["","","",""],this.apiCallStatusNodeInfo={status:l.Bn.COMPLETED},this.apiCallStatusFees={status:l.Bn.COMPLETED},this.apiCallStatusOCBal={status:l.Bn.COMPLETED},this.apiCallStatusAllChannels={status:l.Bn.COMPLETED},this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.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===l.cu.SM||this.screenSize===l.cu.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.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(_.LR).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(_.T$).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=e.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.information=e.information}),this.store.select(_.JG).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessages[1]="",this.apiCallStatusFees=e.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=e.fees}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[3]),(0,tt.M)(this.store.select(_.kY))).subscribe(([e,i])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusAllChannels=e.apiCallStatus,this.apiCallStatusOCBal=i.apiCallStatus,this.apiCallStatusAllChannels.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusAllChannels.message?JSON.stringify(this.apiCallStatusAllChannels.message):this.apiCallStatusAllChannels.message),this.apiCallStatusOCBal.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusOCBal.message?JSON.stringify(this.apiCallStatusOCBal.message):this.apiCallStatusOCBal.message),this.channels=e.activeChannels,this.onchainBalance=i.onchainBalance,this.balances.onchain=this.onchainBalance.total,this.balances.lightning=e.lightningBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const o=e.lightningBalance.localBalance?+e.lightningBalance.localBalance:0,s=e.lightningBalance.remoteBalance?+e.lightningBalance.remoteBalance:0;this.channelBalances={localBalance:o,remoteBalance:s,balancedness:+(1-Math.abs((o-s)/(o+s))).toFixed(3)},this.channelsStatus=e.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(f=>f.toRemote>0),"toRemote"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(f=>f.toLocal>0),"toLocal"))),this.channels.forEach(f=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(f.toRemote),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(f.toLocal)}),this.logger.info(e)})}onNavigateTo(e){this.router.navigateByUrl(e)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.channels.sort((e,i)=>{const o=+e.toLocal+ +e.toRemote,s=+i.toLocal+ +i.toRemote;return o>s?-1:o{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(F.v),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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",3,"fxFlex","ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"balances","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"balances","errorMessage"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["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",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage"],["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(e,i){if(1&e&&(t.YNc(0,hi,7,4,"div",0),t.YNc(1,Si,6,4,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",i.selNode.userPersona===i.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,I.BN,ut.Il,u.sg,ut.DX,A.a8,p.yH,A.dk,A.n5,et.VK,et.OP,A.dn,u.mk,S.oO,u.RF,u.n9,u.ED,q.lW,et.p6,pt.Hw,M.pW,Jt,Ht,$t,jt,ne,he,N.SP,N.uX,dt,gt,N.uD],styles:[""]}),n})();var Ei=g(4084);const qi=["form"];function Ii(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Bitcoin address is required."),t.qZA())}function Fi(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.amountError)}}function Oi(n,a){if(1&n&&(t.TgZ(0,"mat-option",29),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e)}}function Ri(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Target Confirmation Blocks is required."),t.qZA())}function Ni(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.sendFundError)}}function ki(n,a){if(1&n&&(t.TgZ(0,"div",30),t._UZ(1,"fa-icon",31),t.YNc(2,Ni,2,1,"span",12),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.sendFundError)}}let _t=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.logger=i,this.store=o,this.commonService=s,this.decimalPipe=c,this.actions=f,this.faExclamationTriangle=Z.eHv,this.selNode={},this.addressTypes=[],this.selectedAddress=l._t[1],this.blockchainBalance={},this.information={},this.newAddress="",this.transaction={},this.sendFundError="",this.fiatConversion=!1,this.amountUnits=l.uA,this.selAmountUnit=l.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=l.Xz,this.amountError="Amount is Required.",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(Ei.dT).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.fiatConversion=e.settings.fiatConversion,this.amountUnits=e.settings.currencyUnits,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL)).subscribe(e=>{e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL&&(this.store.dispatch((0,v.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"SendOnchainFunds"===e.payload.action&&(this.sendFundError=e.payload.message)})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.transaction.amount&&this.selAmountUnit!==l.NT.SATS?this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit,l.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:e=>{this.transaction.amount=parseInt(e[l.NT.SATS]),this.selAmountUnit=l.NT.SATS,this.store.dispatch((0,O.Iy)({payload:this.transaction}))},error:e=>{this.transaction.amount=null,this.selAmountUnit=l.NT.SATS,this.amountError="Conversion Error: "+e}}):this.store.dispatch((0,O.Iy)({payload: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(e){const i=this,o=this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit;let s=e.value===this.amountUnits[2]?l.NT.OTHER:e.value;this.transaction.amount&&this.selAmountUnit!==e.value&&this.commonService.convertCurrency(this.transaction.amount,o,s,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:c=>{this.selAmountUnit=e.value,i.transaction.amount=+i.decimalPipe.transform(c[s],i.currencyUnitFormats[s]).replace(/,/g,"")},error:c=>{i.transaction.amount=null,this.amountError="Conversion Error: "+c,this.selAmountUnit=o,s=o}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(R.mQ),t.Y36(b.yh),t.Y36(F.v),t.Y36(u.JJ),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-send-modal"]],viewQuery:function(e,i){if(1&e&&t.Gf(qi,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:36,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"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-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Send Payment"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.NdJ("submit",function(){return i.onSendFunds()})("reset",function(){return i.resetData()}),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"input",10,11),t.NdJ("ngModelChange",function(s){return i.transaction.address=s}),t.qZA(),t.YNc(14,Ii,2,0,"mat-error",12),t.qZA(),t.TgZ(15,"mat-form-field",13),t.TgZ(16,"input",14,15),t.NdJ("ngModelChange",function(s){return i.transaction.amount=s}),t.qZA(),t.TgZ(18,"span",16),t._uU(19),t.qZA(),t.YNc(20,Fi,2,1,"mat-error",12),t.qZA(),t.TgZ(21,"mat-form-field",17),t.TgZ(22,"mat-select",18),t.NdJ("selectionChange",function(s){return i.onAmountUnitChange(s)}),t.YNc(23,Oi,2,2,"mat-option",19),t.qZA(),t.qZA(),t.TgZ(24,"div",20),t.TgZ(25,"mat-form-field",21),t.TgZ(26,"input",22,23),t.NdJ("ngModelChange",function(s){return i.transaction.blocks=s}),t.qZA(),t.YNc(28,Ri,2,0,"mat-error",12),t.qZA(),t.qZA(),t._UZ(29,"div",24),t.YNc(30,ki,3,2,"div",25),t.TgZ(31,"div",26),t.TgZ(32,"button",27),t._uU(33,"Clear Fields"),t.qZA(),t.TgZ(34,"button",28),t._uU(35,"Send Funds"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.transaction.address),t.xp6(2),t.Q6J("ngIf",!i.transaction.address),t.xp6(2),t.Q6J("ngModel",i.transaction.amount)("step",100)("min",0),t.xp6(3),t.hij(" ",i.selAmountUnit," "),t.xp6(1),t.Q6J("ngIf",!i.transaction.amount),t.xp6(2),t.Q6J("value",i.selAmountUnit),t.xp6(1),t.Q6J("ngForOf",i.amountUnits),t.xp6(3),t.Q6J("ngModel",i.transaction.blocks)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",!i.transaction.blocks),t.xp6(2),t.Q6J("ngIf",""!==i.sendFundError))},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,D.ZT,A.dn,m._Y,m.JL,m.F,x.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,m.wV,m.qQ,$.q,x.R9,k.gD,u.sg,x.TO,Q.ey,I.BN],styles:[""]}),n})();var at=g(2737);function Pi(n,a){1&n&&t._UZ(0,"mat-progress-bar",31)}function Di(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Date/Time "),t.qZA())}function Ui(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.timestamp,"dd/MMM/YYYY HH:mm"))}}function Mi(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Amount (Sats) "),t.qZA())}function Ji(n,a){if(1&n&&(t.TgZ(0,"span",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.amount))}}function Yi(n,a){if(1&n&&(t.TgZ(0,"span",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("(",t.lcZ(2,1,-1*e.amount),")")}}function Qi(n,a){if(1&n&&(t.TgZ(0,"td",33),t.YNc(1,Ji,3,3,"span",35),t.YNc(2,Yi,3,3,"span",36),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e.amount>0||0===e.amount),t.xp6(1),t.Q6J("ngIf",e.amount<0)}}function Hi(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Fees (Sats) "),t.qZA())}function Bi(n,a){if(1&n&&(t.TgZ(0,"td",33),t.TgZ(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.fees))}}function zi(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Confirmations "),t.qZA())}function Vi(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,1,null==e?null:e.confirmations)," ")}}function Gi(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Address "),t.qZA())}function Xi(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e.address)}}function $i(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",41),t.TgZ(1,"div",42),t.TgZ(2,"mat-select",43),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",44),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Wi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",45),t.TgZ(1,"button",46),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onTransactionClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function Ki(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No transaction available."),t.qZA())}function ji(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting transactions..."),t.qZA())}function ta(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function ea(n,a){if(1&n&&(t.TgZ(0,"td",47),t.YNc(1,Ki,2,0,"p",48),t.YNc(2,ji,2,0,"p",48),t.YNc(3,ta,2,1,"p",48),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.listTransactions&&e.listTransactions.data)||(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const na=function(n){return{"display-none":n}};function ia(n,a){if(1&n&&t._UZ(0,"tr",49),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,na,(null==e.listTransactions?null:e.listTransactions.data)&&(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)>0))}}function aa(n,a){1&n&&t._UZ(0,"tr",50)}function oa(n,a){1&n&&t._UZ(0,"tr",51)}const sa=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},la=function(){return["no_transaction"]};let ra=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.faHistory=Z.qO$,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unsub=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","confirmations","fees","actions"]):this.screenSize===l.cu.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((0,O.mC)()),this.store.select(_.dx).pipe((0,h.R)(this.unsub[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),e.transactions&&this.loadTransactionsTable(e.transactions),this.logger.info(e)})}applyFilter(){this.listTransactions.filter=this.selFilter.trim().toLowerCase()}onTransactionClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"blockHash",value:e.blockHash,title:"Block Hash",width:100}],[{key:"txid",value:e.txid,title:"Transaction ID",width:100}],[{key:"timestamp",value:e.timestamp,title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"confirmations",value:e.confirmations,title:"Number of Confirmations",width:50,type:l.Gi.NUMBER}],[{key:"fees",value:e.fees,title:"Fees (Sats)",width:50,type:l.Gi.NUMBER},{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"address",value:e.address,title:"Address",width:100,type:l.Gi.STRING}]]}}}))}loadTransactionsTable(e){this.listTransactions=new r.by([...e]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.listTransactions.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.listTransactions.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-transaction-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Transactions")}])],decls:37,vars:15,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch"],["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,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",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","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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"div",2),t._UZ(3,"fa-icon",3),t.TgZ(4,"span",4),t._uU(5,"Transaction History"),t.qZA(),t.qZA(),t.TgZ(6,"mat-form-field",5),t.TgZ(7,"input",6),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",7),t.TgZ(9,"div",8),t.YNc(10,Pi,1,0,"mat-progress-bar",9),t.TgZ(11,"table",10,11),t.ynx(13,12),t.YNc(14,Di,2,0,"th",13),t.YNc(15,Ui,3,4,"td",14),t.BQk(),t.ynx(16,15),t.YNc(17,Mi,2,0,"th",16),t.YNc(18,Qi,3,2,"td",14),t.BQk(),t.ynx(19,17),t.YNc(20,Hi,2,0,"th",16),t.YNc(21,Bi,4,3,"td",14),t.BQk(),t.ynx(22,18),t.YNc(23,zi,2,0,"th",19),t.YNc(24,Vi,4,3,"td",20),t.BQk(),t.ynx(25,21),t.YNc(26,Gi,2,0,"th",13),t.YNc(27,Xi,2,1,"td",14),t.BQk(),t.ynx(28,22),t.YNc(29,$i,6,0,"th",23),t.YNc(30,Wi,3,0,"td",24),t.BQk(),t.ynx(31,25),t.YNc(32,ea,4,3,"td",26),t.BQk(),t.YNc(33,ia,1,3,"tr",27),t.YNc(34,aa,1,0,"tr",28),t.YNc(35,oa,1,0,"tr",29),t.qZA(),t._UZ(36,"mat-paginator",30),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Q6J("icon",i.faHistory),t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(3),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.listTransactions)("ngClass",t.VKq(12,sa,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,la)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,I.BN,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,k.gD,k.$L,Q.ey,q.lW,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function ca(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let ua=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.selNode={},this.faExchangeAlt=Z.Ssp,this.faChartPie=Z.OS1,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 d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}),this.store.select(_.LR).pipe((0,h.R)(this.unSubs[1])).subscribe(i=>{this.selNode=i}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(i=>{this.balances=[{title:"Total Balance",dataValue:i.onchainBalance.total||0},{title:"Confirmed",dataValue:i.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:i.onchainBalance.unconfirmed}]})}openSendFundsModal(){this.store.dispatch((0,v.qR)({payload:{data:{component:_t}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"On-chain Transactions"),t.qZA(),t.qZA(),t.TgZ(12,"div",6),t.TgZ(13,"mat-card"),t.TgZ(14,"mat-card-content",4),t.TgZ(15,"nav",7),t.YNc(16,ca,2,3,"div",8),t.qZA(),t.TgZ(17,"div",9),t._UZ(18,"router-outlet"),t.qZA(),t.TgZ(19,"div",10),t._UZ(20,"rtl-ecl-on-chain-transaction-history",11),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,at.D,N.BU,u.sg,p.yH,y.lC,ra,N.Nj,y.rH],styles:[""]}),n})();var Ct=g(4377);function pa(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Channels"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activeChannels)}}function ma(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Peers"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activePeers)}}let da=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.activePeers=0,this.activeChannels=0,this.faUsers=Z.FVb,this.faChartPie=Z.OS1,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 d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof y.Av)).subscribe(e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activePeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.activeChannels=e.channelsStatus&&e.channelsStatus.active&&e.channelsStatus.active.channels?e.channelsStatus.active.channels:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.balances=[{title:"Total Balance",dataValue:e.onchainBalance.total||0},{title:"Confirmed",dataValue:e.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:e.onchainBalance.unconfirmed}]})}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Connections"),t.qZA(),t.qZA(),t.TgZ(12,"div",6),t.TgZ(13,"mat-card"),t.TgZ(14,"mat-card-content",4),t.TgZ(15,"mat-tab-group",7),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(16,"mat-tab"),t.YNc(17,pa,2,1,"ng-template",8),t.qZA(),t.TgZ(18,"mat-tab"),t.YNc(19,ma,2,1,"ng-template",8),t.qZA(),t.qZA(),t.TgZ(20,"div",9),t._UZ(21,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faUsers),t.xp6(6),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,at.D,N.SP,N.uX,N.uD,p.yH,y.lC,Ct.k],styles:[""]}),n})();function ha(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let ga=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,this.faExchangeAlt=Z.Ssp,this.faChartPie=Z.OS1,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"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[1]),(0,tt.M)(this.store.select(_.LR))).subscribe(([i,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===l.ol.OPERATOR?[{title:"Local Capacity",dataValue:i.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:i.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:i.lightningBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:i.lightningBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(i)})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Lightning Balance"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA(),t.qZA(),t.qZA(),t.TgZ(8,"div",6),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Lightning Transactions"),t.qZA(),t.qZA(),t.TgZ(12,"div",7),t.TgZ(13,"mat-card"),t.TgZ(14,"mat-card-content",4),t.TgZ(15,"nav",8),t.YNc(16,ha,2,3,"div",9),t.qZA(),t.TgZ(17,"div",10),t._UZ(18,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,at.D,N.BU,u.sg,p.yH,y.lC,N.Nj,y.rH],styles:[""]}),n})();function fa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let _a=(()=>{class n{constructor(e){this.router=e,this.faMapSigns=Z.SuH,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 d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"fa-icon",2),t.TgZ(3,"span",3),t._uU(4,"Routing"),t.qZA(),t.qZA(),t.TgZ(5,"div",4),t.TgZ(6,"mat-card",5),t.TgZ(7,"mat-card-content",6),t.TgZ(8,"div",7),t.TgZ(9,"nav",8),t.YNc(10,fa,2,3,"div",9),t.qZA(),t.qZA(),t.TgZ(11,"div",10),t._UZ(12,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(2),t.Q6J("icon",i.faMapSigns),t.xp6(8),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,p.yH,A.a8,A.dn,N.BU,u.sg,y.lC,N.Nj,y.rH],styles:[""]}),n})();var xt=g(9859),yt=g(9966),Zt=g(1979);function Ca(n,a){if(1&n&&(t.TgZ(0,"span",9),t.TgZ(1,"div"),t._uU(2),t.ALo(3,"titlecase"),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.AsE("",i.nodeFeaturesEnum[e.key]||e.key,": ",t.lcZ(3,2,e.value),"")}}function xa(n,a){1&n&&(t.TgZ(0,"th",24),t._uU(1,"Address"),t.qZA())}function ya(n,a){if(1&n&&(t.TgZ(0,"td",25),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",e," ")}}function Za(n,a){1&n&&(t.TgZ(0,"th",26),t.TgZ(1,"span",27),t._uU(2,"Actions"),t.qZA(),t.qZA())}function Ta(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",28),t.TgZ(1,"span",27),t.TgZ(2,"button",29),t.NdJ("copied",function(o){return t.CHM(e),t.oxw(2).onCopyNodeURI(o)}),t._uU(3,"Copy Node URI"),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("payload",(null==i.lookupResult?null:i.lookupResult.nodeId)+"@"+e)}}function Aa(n,a){1&n&&t._UZ(0,"tr",30)}function La(n,a){1&n&&t._UZ(0,"tr",31)}const va=function(n){return{"background-color":n}};function ba(n,a){if(1&n&&(t.TgZ(0,"div",1),t._UZ(1,"mat-divider",2),t.TgZ(2,"div",3),t.TgZ(3,"div",4),t.TgZ(4,"h4",5),t._uU(5,"Alias"),t.qZA(),t.TgZ(6,"span",6),t._uU(7),t.TgZ(8,"span",7),t._uU(9),t.qZA(),t.qZA(),t.qZA(),t.TgZ(10,"div",8),t.TgZ(11,"h4",5),t._uU(12,"Pub Key"),t.qZA(),t.TgZ(13,"span",9),t._uU(14),t.qZA(),t.qZA(),t.qZA(),t._UZ(15,"mat-divider",2),t.TgZ(16,"div",3),t.TgZ(17,"div",4),t.TgZ(18,"h4",5),t._uU(19,"Date/Time"),t.qZA(),t.TgZ(20,"span",6),t._uU(21),t.ALo(22,"date"),t.qZA(),t.qZA(),t.TgZ(23,"div",8),t.TgZ(24,"h4",5),t._uU(25,"Features"),t.qZA(),t.YNc(26,Ca,4,4,"span",10),t.ALo(27,"keyvalue"),t.qZA(),t.qZA(),t._UZ(28,"mat-divider",2),t.TgZ(29,"div",3),t.TgZ(30,"div",11),t.TgZ(31,"h4",5),t._uU(32,"Signature"),t.qZA(),t.TgZ(33,"span",6),t._uU(34),t.qZA(),t.qZA(),t.qZA(),t._UZ(35,"mat-divider",2),t.TgZ(36,"div",1),t.TgZ(37,"h4",12),t._uU(38,"Addresses"),t.qZA(),t.TgZ(39,"div",13),t.TgZ(40,"table",14,15),t.ynx(42,16),t.YNc(43,xa,2,0,"th",17),t.YNc(44,ya,2,1,"td",18),t.BQk(),t.ynx(45,19),t.YNc(46,Za,3,0,"th",20),t.YNc(47,Ta,4,1,"td",21),t.BQk(),t.YNc(48,Aa,1,0,"tr",22),t.YNc(49,La,1,0,"tr",23),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.alias),t.xp6(1),t.Q6J("ngStyle",t.VKq(19,va,null==e.lookupResult?null:e.lookupResult.rgbColor)),t.xp6(1),t.Oqu(null!=e.lookupResult&&e.lookupResult.rgbColor?null==e.lookupResult?null:e.lookupResult.rgbColor:""),t.xp6(5),t.Oqu(null==e.lookupResult?null:e.lookupResult.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.xi3(22,14,1e3*(null==e.lookupResult?null:e.lookupResult.timestamp),"dd/MMM/YYYY HH:mm")),t.xp6(5),t.Q6J("ngForOf",t.lcZ(27,17,null==e.lookupResult?null:e.lookupResult.features.activated)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.signature),t.xp6(1),t.Q6J("inset",!0),t.xp6(5),t.Q6J("dataSource",e.addresses),t.xp6(8),t.Q6J("matHeaderRowDef",e.displayedColumns),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}let Sa=(()=>{class n{constructor(e,i){this.logger=e,this.snackBar=i,this.lookupResult={},this.displayedColumns=["address","actions"],this.nodeFeaturesEnum=l.H_}ngOnInit(){this.addresses=new r.by(this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null}onCopyNodeURI(e){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(yt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-lookup"]],viewQuery:function(e,i){if(1&e&&t.Gf(T.YE,5),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column",4,"ngIf"],["fxLayout","column"],[1,"my-1",3,"inset"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"ml-2",3,"ngStyle"],["fxFlex","70"],[1,"foreground-secondary-text","w-100"],["class","foreground-secondary-text w-100",4,"ngFor","ngForOf"],["fxFlex","100"],["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(e,i){1&e&&t.YNc(0,ba,50,21,"div",0),2&e&&t.Q6J("ngIf",i.lookupResult)},directives:[u.O5,p.xw,G.d,p.yH,p.Wh,u.PC,S.Zl,u.sg,Y.$V,r.BZ,T.YE,r.w1,r.fO,r.Dz,r.as,r.nj,r.ge,T.nU,r.ev,q.lW,Zt.y,r.XQ,r.Gk],pipes:[u.uU,u.Nd,u.rS],styles:[""]}),n})();const wa=["form"];function Ea(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder," is required.")}}function qa(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Invalid ",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder,".")}}function Ia(n,a){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"rtl-ecl-node-lookup",25),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("lookupResult",e.nodeLookupValue)}}function Fa(n,a){if(1&n&&(t.TgZ(0,"span",23),t.YNc(1,Ia,2,1,"div",24),t.qZA()),2&n){const e=t.oxw(2),i=t.MAs(21);t.xp6(1),t.Q6J("ngIf",e.nodeLookupValue.nodeId)("ngIfElse",i)}}function Oa(n,a){1&n&&(t.TgZ(0,"span",23),t.TgZ(1,"h3"),t._uU(2,"Error! Unable to find details!"),t.qZA(),t.qZA())}function Ra(n,a){if(1&n&&(t.TgZ(0,"div",17),t.TgZ(1,"div",18),t.TgZ(2,"span",19),t._uU(3),t.qZA(),t.qZA(),t.TgZ(4,"div",20),t.YNc(5,Fa,2,2,"span",21),t.YNc(6,Oa,3,0,"span",22),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(3),t.hij("",e.lookupFields[e.selectedFieldId].name," Details"),t.xp6(1),t.Q6J("ngSwitch",e.selectedFieldId),t.xp6(1),t.Q6J("ngSwitchCase",0)}}function Na(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find details!"),t.qZA())}const ka=function(n){return{"mt-1":!0,"mt-2":n}};let Pa=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.actions=s,this.lookupKeyCtrl=new m.NI,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=Z.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{if(e.type===l.lr.SET_LOOKUP_ECL){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue=JSON.parse(JSON.stringify(e.payload[0]))||{nodeid:""};break;case 1:this.channelLookupValue=JSON.parse(JSON.stringify(e.payload))||[]}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"Lookup"===e.payload.action&&(this.flgLoading[0]="error")}),this.lookupKeyCtrl.valueChanges.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1})}onLookup(){return this.lookupKeyCtrl.value?this.lookupKeyCtrl.value&&(this.lookupKeyCtrl.value.includes("@")||this.lookupKeyCtrl.value.includes(","))?(this.lookupKeyCtrl.setErrors({invalid:!0}),!0):void(0===(this.selectedFieldId||(this.selectedFieldId=0),this.flgSetLookupValue=!1,this.nodeLookupValue={},this.channelLookupValue=[],this.selectedFieldId)&&this.store.dispatch((0,O.Sf)({payload:this.lookupKeyCtrl.value.trim()}))):(this.lookupKeyCtrl.setErrors({required:!0}),!0)}onSelectChange(e){this.resetData(),this.selectedFieldId=e.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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lookups"]],viewQuery:function(e,i){if(1&e&&t.Gf(wa,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:22,vars:9,consts:[["fxLayout","column"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField"],["checked","",1,"mr-4",3,"value"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"formControl","placeholder"],["key",""],[4,"ngIf"],["fxLayout","row","fxFlex","100",1,"mt-1"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-content",2),t.TgZ(3,"form",3,4),t.TgZ(5,"div",5),t.TgZ(6,"mat-radio-group",6),t.TgZ(7,"mat-radio-button",7),t._uU(8,"Node"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(9,"mat-form-field",8),t._UZ(10,"input",9,10),t.YNc(12,Ea,2,1,"mat-error",11),t.YNc(13,qa,2,1,"mat-error",11),t.qZA(),t.TgZ(14,"div",12),t.TgZ(15,"button",13),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",14),t.NdJ("click",function(){return i.onLookup()}),t._uU(18,"Lookup"),t.qZA(),t.qZA(),t.qZA(),t.YNc(19,Ra,7,3,"div",15),t.qZA(),t.qZA(),t.qZA(),t.YNc(20,Na,2,0,"ng-template",null,16,t.W1O)),2&e&&(t.xp6(7),t.Q6J("value",0),t.xp6(2),t.Q6J("ngClass",t.VKq(7,ka,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM)),t.xp6(1),t.Q6J("formControl",i.lookupKeyCtrl)("placeholder",(null==i.lookupFields[i.selectedFieldId]?null:i.lookupFields[i.selectedFieldId].placeholder)||"Lookup Key"),t.xp6(2),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.invalid),t.xp6(6),t.Q6J("ngIf",i.flgSetLookupValue))},directives:[p.xw,p.yH,p.Wh,A.dn,m._Y,m.JL,m.F,xt.VQ,xt.U0,x.KE,u.mk,S.oO,U.Nt,m.Fj,m.Q7,m.JJ,m.oH,u.O5,q.lW,x.TO,u.RF,u.n9,u.ED,Sa],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var Da=g(4240);let Ua=(()=>{class n{constructor(e,i){this.store=e,this.eclEffects=i,this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,O._E)()),this.eclEffects.setNewAddress.pipe((0,H.q)(1)).subscribe(e=>{this.newAddress=e,setTimeout(()=>{this.store.dispatch((0,v.qR)({payload:{data:{address:this.newAddress,addressType:"",component:Da.n}}}))},0)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(it.o))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-receive"]],decls:4,vars:0,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"button",2),t.NdJ("click",function(){return i.onGenerateAddress()}),t._uU(3,"Generate Address"),t.qZA(),t.qZA(),t.qZA())},directives:[p.xw,p.yH,p.Wh,q.lW],styles:[""]}),n})(),Ma=(()=>{class n{constructor(e,i){this.store=e,this.activatedRoute=i,this.sweepAll=!1,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activatedRoute.data.pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.sweepAll=e.sweepAll})}openSendFundsModal(){this.store.dispatch((0,v.qR)({payload:{data:{sweepAll:this.sweepAll,component:_t}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(y.gz))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"button",2),t.NdJ("click",function(){return i.openSendFundsModal()}),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Oqu(i.sweepAll?"Sweep All":"Send Funds"))},directives:[p.xw,p.yH,p.Wh,q.lW],styles:[""]}),n})();var Ja=g(579),Tt=g(2201),Ya=g(4085),At=g(9511),Lt=g(9851);const Qa=["form"];function Ha(n,a){if(1&n&&(t.TgZ(0,"mat-option",34),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e.alias?e.alias:e.nodeId?e.nodeId:"")}}function Ba(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer alias is required."),t.qZA())}function za(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer not found in the list."),t.qZA())}function Va(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1),t.TgZ(1,"input",30),t.NdJ("change",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.qZA(),t.TgZ(2,"mat-autocomplete",31,32),t.NdJ("optionSelected",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.YNc(4,Ha,2,2,"mat-option",33),t.ALo(5,"async"),t.qZA(),t.YNc(6,Ba,2,0,"mat-error",17),t.YNc(7,za,2,0,"mat-error",17),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("formControl",i.selectedPeer)("matAutocomplete",e),t.xp6(1),t.Q6J("displayWith",i.displayFn),t.xp6(2),t.Q6J("ngForOf",t.lcZ(5,6,i.filteredPeers)),t.xp6(2),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.notfound)}}function Ga(n,a){1&n&&t.GkF(0)}function Xa(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function $a(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function Wa(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.channelConnectionError)}}function Ka(n,a){if(1&n&&(t.TgZ(0,"div",35),t._UZ(1,"fa-icon",36),t.YNc(2,Wa,2,1,"span",17),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.channelConnectionError)}}function ja(n,a){if(1&n&&(t.TgZ(0,"mat-expansion-panel",38),t.TgZ(1,"mat-expansion-panel-header"),t.TgZ(2,"mat-panel-title"),t.TgZ(3,"span"),t._uU(4,"Peer: \xa0"),t.qZA(),t.TgZ(5,"strong",39),t._uU(6),t.qZA(),t.qZA(),t.qZA(),t.TgZ(7,"div",9),t.TgZ(8,"div",0),t.TgZ(9,"div",1),t.TgZ(10,"h4",40),t._uU(11,"Pubkey"),t.qZA(),t.TgZ(12,"span",41),t._uU(13),t.qZA(),t.qZA(),t.qZA(),t._UZ(14,"mat-divider",42),t.TgZ(15,"div",0),t.TgZ(16,"div",43),t.TgZ(17,"h4",40),t._uU(18,"Address"),t.qZA(),t.TgZ(19,"span",44),t._uU(20),t.qZA(),t.qZA(),t.TgZ(21,"div",43),t.TgZ(22,"h4",40),t._uU(23,"State"),t.qZA(),t.TgZ(24,"span",44),t._uU(25),t.ALo(26,"titlecase"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&n){const e=t.oxw(2);t.xp6(6),t.Oqu((null==e.peer?null:e.peer.alias)||(null==e.peer?null:e.peer.nodeId)),t.xp6(7),t.Oqu(e.peer.nodeId),t.xp6(7),t.Oqu(null==e.peer?null:e.peer.address),t.xp6(5),t.Oqu(t.lcZ(26,4,null==e.peer?null:e.peer.state))}}function to(n,a){if(1&n&&t.YNc(0,ja,27,6,"mat-expansion-panel",37),2&n){const e=t.oxw();t.Q6J("ngIf",e.peer)}}let vt=(()=>{class n{constructor(e,i,o,s){this.dialogRef=e,this.data=i,this.store=o,this.actions=s,this.selectedPeer=new m.NI,this.faExclamationTriangle=Z.eHv,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.feeRate=null,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(o=>o.type===l.lr.UPDATE_API_CALL_STATUS_ECL||o.type===l.lr.FETCH_CHANNELS_ECL)).subscribe(o=>{o.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&o.payload.status===l.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===l.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close()});let e="",i="";this.sortedPeers=this.peers.sort((o,s)=>(e=o.alias?o.alias.toLowerCase():o.nodeId?o.nodeId.toLowerCase():"",i=s.alias?s.alias.toLowerCase():o.nodeId.toLowerCase(),ei?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,h.R)(this.unSubs[1]),(0,Ja.O)(""),(0,Tt.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.nodeId),(0,Tt.U)(o=>o?this.filterPeers(o):this.sortedPeers.slice()))}filterPeers(e){return this.sortedPeers.filter(i=>0===i.alias.toLowerCase().indexOf(e?e.toLowerCase():""))}displayFn(e){return e&&e.alias?e.alias:e&&e.nodeId?e.nodeId:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.nodeId?this.selectedPeer.value.nodeId:null,"string"==typeof this.selectedPeer.value){const e=this.peers.filter(i=>i.alias.length===this.selectedPeer.value.length&&0===i.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===e.length&&e[0].nodeId&&(this.selectedPubkey=e[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(e){this.advancedTitle=e&&this.feeRate&&this.feeRate>0?"Advanced Options | Fee (Sats/vByte): "+this.feeRate:"Advanced Options"}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0)return!0;this.store.dispatch((0,O.YX)({payload:{nodeId:this.peer&&this.peer.nodeId?this.peer.nodeId:this.selectedPubkey,amount:this.fundingAmount,private:this.isPrivate,feeRate:this.feeRate}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(b.yh),t.Y36(B.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-open-channel"]],viewQuery:function(e,i){if(1&e&&t.Gf(Qa,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:48,vars:18,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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"],["matInput","","placeholder","Fee (Sats/vByte)","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-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-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(e,i){if(1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"form",7,8),t.NdJ("submit",function(){return i.onOpenChannel()})("reset",function(){return i.resetData()}),t.TgZ(11,"div",9),t.YNc(12,Va,8,8,"mat-form-field",10),t.qZA(),t.YNc(13,Ga,1,0,"ng-container",11),t.TgZ(14,"div",9),t.TgZ(15,"div",12),t.TgZ(16,"mat-form-field",13),t.TgZ(17,"input",14,15),t.NdJ("ngModelChange",function(s){return i.fundingAmount=s}),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"span",16),t._uU(23," Sats "),t.qZA(),t.YNc(24,Xa,2,0,"mat-error",17),t.YNc(25,$a,2,1,"mat-error",17),t.qZA(),t.TgZ(26,"div",18),t.TgZ(27,"mat-slide-toggle",19),t.NdJ("ngModelChange",function(s){return i.isPrivate=s}),t._uU(28,"Private Channel"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(29,"mat-expansion-panel",20),t.NdJ("closed",function(){return i.onAdvancedPanelToggle(!0)})("opened",function(){return i.onAdvancedPanelToggle(!1)}),t.TgZ(30,"mat-expansion-panel-header"),t.TgZ(31,"mat-panel-title"),t.TgZ(32,"span"),t._uU(33),t.qZA(),t.qZA(),t.qZA(),t.TgZ(34,"div",21),t.TgZ(35,"div",12),t.TgZ(36,"div",22),t.TgZ(37,"mat-form-field",1),t.TgZ(38,"input",23,24),t.NdJ("ngModelChange",function(s){return i.feeRate=s}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(40,Ka,3,2,"div",25),t.TgZ(41,"div",26),t.TgZ(42,"button",27),t._uU(43,"Clear Fields"),t.qZA(),t.TgZ(44,"button",28),t._uU(45,"Open Channel"),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(46,to,1,1,"ng-template",null,29,t.W1O)),2&e){const o=t.MAs(18),s=t.MAs(47);t.xp6(5),t.Oqu(i.alertTitle),t.xp6(7),t.Q6J("ngIf",!i.peer&&i.peers&&i.peers.length>0),t.xp6(1),t.Q6J("ngTemplateOutlet",s),t.xp6(4),t.Q6J("ngModel",i.fundingAmount)("step",1e3)("min",1)("max",i.totalBalance),t.xp6(3),t.hij("Remaining Bal: ",t.lcZ(21,16,i.totalBalance-(i.fundingAmount?i.fundingAmount:0)),""),t.xp6(4),t.Q6J("ngIf",null==o.errors?null:o.errors.required),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.max),t.xp6(2),t.Q6J("ngModel",i.isPrivate),t.xp6(6),t.Oqu(i.advancedTitle),t.xp6(5),t.Q6J("ngModel",i.feeRate)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",""!==i.channelConnectionError)}},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,A.dn,m._Y,m.JL,m.F,u.O5,u.tP,x.KE,U.Nt,m.wV,m.qQ,m.Fd,m.Fj,$.q,Ya.F,m.Q7,m.JJ,m.On,x.bx,x.R9,At.Rr,V.ib,V.yz,V.yK,X.h,Lt.ZL,m.oH,Lt.XC,u.sg,Q.ey,x.TO,I.BN,G.d],pipes:[u.JJ,u.Ov,u.rS],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();function eo(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Open"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfOpenChannels)}}function no(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Pending"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfPendingChannels)}}function io(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Inactive"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfInactiveChannels)}}let ao=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,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 d.x,new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof y.Av)).subscribe(e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.numOfOpenChannels=e.channelsStatus&&e.channelsStatus.active&&e.channelsStatus.active.channels?e.channelsStatus.active.channels:0,this.numOfPendingChannels=e.channelsStatus&&e.channelsStatus.pending&&e.channelsStatus.pending.channels?e.channelsStatus.pending.channels:0,this.numOfInactiveChannels=e.channelsStatus&&e.channelsStatus.inactive&&e.channelsStatus.inactive.channels?e.channelsStatus.inactive.channels:0,this.logger.info(e)}),this.store.select(_.LR).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.selNode=e}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.peers=e.peers}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}onOpenChannel(){this.store.dispatch((0,v.qR)({payload:{data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:vt}}}))}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/channels/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channels-tables"]],decls:14,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"button",2),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(3,"Open Channel"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-tab-group",4),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(6,"mat-tab"),t.YNc(7,eo,2,1,"ng-template",5),t.qZA(),t.TgZ(8,"mat-tab"),t.YNc(9,no,2,1,"ng-template",5),t.qZA(),t.TgZ(10,"mat-tab"),t.YNc(11,io,2,1,"ng-template",5),t.qZA(),t.qZA(),t.TgZ(12,"div",6),t._UZ(13,"router-outlet"),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(5),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.yH,p.Wh,q.lW,N.SP,N.uX,N.uD,y.lC,Ct.k],styles:[""]}),n})();function oo(n,a){if(1&n&&(t.TgZ(0,"div",11),t.TgZ(1,"h4",12),t._uU(2,"Short Channel ID"),t.qZA(),t.TgZ(3,"span",13),t._uU(4),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(e.channel.shortChannelId)}}function so(n,a){if(1&n&&(t.TgZ(0,"div",11),t.TgZ(1,"h4",12),t._uU(2,"State"),t.qZA(),t.TgZ(3,"span",15),t._uU(4),t.ALo(5,"titlecase"),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(t.lcZ(5,1,e.channel.state))}}function lo(n,a){if(1&n&&(t.TgZ(0,"div"),t.TgZ(1,"div",9),t.TgZ(2,"div",11),t.TgZ(3,"h4",12),t._uU(4,"Local Balance (Sats)"),t.qZA(),t.TgZ(5,"span",15),t._uU(6),t.ALo(7,"number"),t.qZA(),t.qZA(),t.TgZ(8,"div",11),t.TgZ(9,"h4",12),t._uU(10,"Remote Balance (Sats)"),t.qZA(),t.TgZ(11,"span",15),t._uU(12),t.ALo(13,"number"),t.qZA(),t.qZA(),t.qZA(),t._UZ(14,"mat-divider",14),t.TgZ(15,"div",9),t.TgZ(16,"div",11),t.TgZ(17,"h4",12),t._uU(18,"Base Fee (mSats)"),t.qZA(),t.TgZ(19,"span",15),t._uU(20),t.ALo(21,"number"),t.qZA(),t.qZA(),t.TgZ(22,"div",11),t.TgZ(23,"h4",12),t._uU(24,"Fee Rate (mili mSats)"),t.qZA(),t.TgZ(25,"span",15),t._uU(26),t.ALo(27,"number"),t.qZA(),t.qZA(),t.qZA(),t._UZ(28,"mat-divider",14),t.qZA()),2&n){const e=t.oxw();t.xp6(6),t.Oqu(t.lcZ(7,6,e.channel.toLocal)),t.xp6(6),t.Oqu(t.lcZ(13,8,e.channel.toRemote)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(21,10,e.channel.feeBaseMsat)),t.xp6(6),t.Oqu(t.lcZ(27,12,e.channel.feeProportionalMillionths)),t.xp6(2),t.Q6J("inset",!0)}}function ro(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Show Advanced"),t.qZA())}function co(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Hide Advanced"),t.qZA())}function uo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){return t.CHM(e),t.oxw().onShowAdvanced()}),t.YNc(1,ro,2,0,"p",22),t.YNc(2,co,2,0,"ng-template",null,23,t.W1O),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("ngIf",!i.showAdvanced)("ngIfElse",e)}}function po(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Short Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.shortChannelId)}}function mo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.channelId)}}const ho=function(n){return{"xs-scroll-y":n}},go=function(n,a){return{"mt-2":n,"mt-1":a}};let ot=(()=>{class n{constructor(e,i,o,s,c){this.dialogRef=e,this.data=i,this.logger=o,this.commonService=s,this.snackBar=c,this.faReceipt=Z.dLy,this.showAdvanced=!1,this.channelsType="open",this.screenSize="",this.screenSizeEnum=l.cu}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(e){this.snackBar.open("open"===this.channelsType?"Short channel ID "+e+" copied.":"Channel ID copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(R.mQ),t.Y36(F.v),t.Y36(yt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-information"]],decls:64,vars:28,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["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"],[1,"padding-gap-x-large",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"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1","class","mr-1",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span",5),t._uU(6,"Channel Information"),t.qZA(),t.qZA(),t.TgZ(7,"button",6),t.NdJ("click",function(){return i.onClose()}),t._uU(8,"X"),t.qZA(),t.qZA(),t.TgZ(9,"mat-card-content",7),t.TgZ(10,"div",8),t.TgZ(11,"div",9),t.YNc(12,oo,5,1,"div",10),t.TgZ(13,"div",11),t.TgZ(14,"h4",12),t._uU(15,"Peer Alias"),t.qZA(),t.TgZ(16,"span",13),t._uU(17),t.qZA(),t.qZA(),t.YNc(18,so,6,3,"div",10),t.qZA(),t._UZ(19,"mat-divider",14),t.TgZ(20,"div",9),t.TgZ(21,"div",1),t.TgZ(22,"h4",12),t._uU(23,"Channel ID"),t.qZA(),t.TgZ(24,"span",13),t._uU(25),t.qZA(),t.qZA(),t.qZA(),t._UZ(26,"mat-divider",14),t.TgZ(27,"div",9),t.TgZ(28,"div",1),t.TgZ(29,"h4",12),t._uU(30,"Peer Public Key"),t.qZA(),t.TgZ(31,"span",13),t._uU(32),t.qZA(),t.qZA(),t.qZA(),t._UZ(33,"mat-divider",14),t.TgZ(34,"div",9),t.TgZ(35,"div",11),t.TgZ(36,"h4",12),t._uU(37,"Private"),t.qZA(),t.TgZ(38,"span",15),t._uU(39),t.qZA(),t.qZA(),t.TgZ(40,"div",11),t.TgZ(41,"h4",12),t._uU(42,"Funder"),t.qZA(),t.TgZ(43,"span",15),t._uU(44),t.qZA(),t.qZA(),t.qZA(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9),t.TgZ(47,"div",11),t.TgZ(48,"h4",12),t._uU(49,"State"),t.qZA(),t.TgZ(50,"span",15),t._uU(51),t.ALo(52,"titlecase"),t.qZA(),t.qZA(),t.TgZ(53,"div",11),t.TgZ(54,"h4",12),t._uU(55,"Buried"),t.qZA(),t.TgZ(56,"span",15),t._uU(57),t.qZA(),t.qZA(),t.qZA(),t._UZ(58,"mat-divider",14),t.YNc(59,lo,29,14,"div",16),t.TgZ(60,"div",17),t.YNc(61,uo,4,2,"button",18),t.YNc(62,po,2,1,"button",19),t.YNc(63,mo,2,1,"button",20),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(4),t.Q6J("icon",i.faReceipt),t.xp6(5),t.Q6J("ngClass",t.VKq(23,ho,i.screenSize===i.screenSizeEnum.XS)),t.xp6(3),t.Q6J("ngIf","open"===i.channelsType),t.xp6(5),t.Oqu(i.channel.alias),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.channelId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(0===i.channel.channelFlags?"Yes":"No"),t.xp6(5),t.Oqu(i.channel.isFunder?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(52,21,i.channel.state)),t.xp6(6),t.Oqu(i.channel.buried?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(1),t.Q6J("ngIf",i.showAdvanced&&"open"===i.channelsType),t.xp6(1),t.Q6J("ngClass",t.WLB(25,go,!i.showAdvanced,i.showAdvanced)),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType))},directives:[p.xw,p.Wh,p.yH,A.dk,I.BN,q.lW,A.dn,u.mk,S.oO,u.O5,G.d,X.h,Zt.y],pipes:[u.rS,u.JJ],styles:[""]}),n})();function fo(n,a){1&n&&t._UZ(0,"mat-progress-bar",30)}function _o(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Short Channel ID "),t.qZA())}function Co(n,a){if(1&n&&(t.TgZ(0,"span",37),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function xo(n,a){if(1&n&&(t.TgZ(0,"span",39),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const bt=function(n){return{"max-width":n}};function yo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"div",33),t.YNc(2,Co,2,1,"span",34),t.YNc(3,xo,2,1,"span",35),t.TgZ(4,"span",36),t._uU(5),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(4,bt,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(null==e?null:e.shortChannelId)}}function Zo(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Alias "),t.qZA())}function To(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"div",33),t.TgZ(2,"span",36),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,bt,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(2),t.Oqu(e.alias)}}function Ao(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Base Fee (mSats) "),t.qZA())}function Lo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeBaseMsat,"1.0-0")," ")}}function vo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Fee Rate (mili mSats) "),t.qZA())}function bo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeProportionalMillionths,"1.0-0")," ")}}function So(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Local Balance (Sats) "),t.qZA())}function wo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function Eo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Remote Balance (Sats) "),t.qZA())}function qo(n,a){if(1&n&&(t.TgZ(0,"td",32),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Io(n,a){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Balance Score "),t.qZA())}function Fo(n,a){if(1&n&&(t.TgZ(0,"td",43),t.TgZ(1,"div",44),t.TgZ(2,"mat-hint",45),t._uU(3),t.ALo(4,"number"),t.qZA(),t.qZA(),t._UZ(5,"mat-progress-bar",46),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function Oo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",47),t.TgZ(1,"div",48),t.TgZ(2,"mat-select",49),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onChannelUpdate("all")}),t._uU(5,"Update Fee Policy"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(7,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Ro(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",51),t.TgZ(1,"div",52),t.TgZ(2,"mat-select",53),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelUpdate(s)}),t._uU(7,"Update Fee Policy"),t.qZA(),t.TgZ(8,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!1)}),t._uU(9,"Close Channel"),t.qZA(),t.TgZ(10,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(11,"Force Close"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function No(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No peers connected. Add a peer in order to open a channel."),t.qZA())}function ko(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No channel available."),t.qZA())}function Po(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting channels..."),t.qZA())}function Do(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Uo(n,a){if(1&n&&(t.TgZ(0,"td",54),t.YNc(1,No,2,0,"p",55),t.YNc(2,ko,2,0,"p",55),t.YNc(3,Po,2,0,"p",55),t.YNc(4,Do,2,1,"p",55),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.numPeers<1&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",e.numPeers>0&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Mo=function(n){return{"display-none":n}};function Jo(n,a){if(1&n&&t._UZ(0,"tr",56),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Mo,e.numPeers>0&&(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Yo(n,a){1&n&&t._UZ(0,"tr",57)}function Qo(n,a){1&n&&t._UZ(0,"tr",58)}const Ho=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Bo=function(){return["no_peer"]};let zo=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.faEye=Z.Mdf,this.faEyeSlash=Z.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.activeChannels=e.activeChannels,this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable(),this.logger.info(e)}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable()}onChannelUpdate(e){"all"!==e&&"NORMAL"!==e.state||(this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"all"===e?"Update fee policy for all channels":"Update fee policy for Channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:e&&void 0!==e.feeBaseMsat?e.feeBaseMsat:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:e&&void 0!==e.feeProportionalMillionths?e.feeProportionalMillionths:100,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(s=>{if(s){const c=s[0].inputValue,f=s[1].inputValue;let P=null;if(this.commonService.isVersionCompatible(this.information.version,"0.6.2")){let C="";"all"===e?(this.activeChannels.forEach(E=>{C=C+","+E.nodeId}),C=C.substring(1),P={baseFeeMsat:c,feeRate:f,nodeIds:C}):P={baseFeeMsat:c,feeRate:f,nodeId:e.nodeId}}else{let C="";"all"===e?(this.activeChannels.forEach(E=>{C=C+","+E.channelId}),C=C.substring(1),P={baseFeeMsat:c,feeRate:f,channelIds:C}):P={baseFeeMsat:c,feeRate:f,channelId:e.channelId}}this.store.dispatch((0,O.pW)({payload:P}))}}),this.applyFilter())}percentHintFunction(e){return(e/1e4).toString()+"%"}onChannelClose(e,i){this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:i?"Force Close Channel":"Close Channel",titleMessage:i?"Force closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId):"Closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),noBtnText:"Cancel",yesBtnText:i?"Force Close":"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[5])).subscribe(f=>{f&&this.store.dispatch((0,O.BL)({payload:{channelId:e.channelId,force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{channel:e,channelsType:"open",component:ot}}}))}loadChannelsTable(){this.activeChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...this.activeChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(K.V),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-open-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:39,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","shortChannelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","feeBaseMsat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","feeProportionalMillionths"],["matColumnDef","toLocal"],["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-1",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"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3),t.TgZ(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,fo,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,_o,2,0,"th",10),t.YNc(11,yo,6,6,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,Zo,2,0,"th",10),t.YNc(14,To,4,4,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Ao,2,0,"th",14),t.YNc(17,Lo,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,vo,2,0,"th",14),t.YNc(20,bo,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,So,2,0,"th",14),t.YNc(23,wo,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,Eo,2,0,"th",14),t.YNc(26,qo,4,4,"td",11),t.BQk(),t.ynx(27,18),t.YNc(28,Io,2,0,"th",19),t.YNc(29,Fo,6,4,"td",20),t.BQk(),t.ynx(30,21),t.YNc(31,Oo,8,0,"th",22),t.YNc(32,Ro,12,0,"td",23),t.BQk(),t.ynx(33,24),t.YNc(34,Uo,5,4,"td",25),t.BQk(),t.YNc(35,Jo,1,3,"tr",26),t.YNc(36,Yo,1,0,"tr",27),t.YNc(37,Qo,1,0,"tr",28),t.qZA(),t.qZA(),t._UZ(38,"mat-paginator",29),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,Ho,""!==i.errorMessage)),t.xp6(28),t.Q6J("matFooterRowDef",t.DdM(13,Bo)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,z.gM,I.BN,x.bx,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],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%]{padding-left:1rem;flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:2rem;flex:0 0 17%;width:17%}.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 10%;width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 56.25em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset;flex:1 1 20%;width:20%}}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 56.25em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 90%}}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();function Vo(n,a){1&n&&t._UZ(0,"mat-progress-bar",25)}function Go(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," State "),t.qZA())}function Xo(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.state),"")}}function $o(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," Alias "),t.qZA())}function Wo(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.alias)}}function Ko(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Local Balance (Sats) "),t.qZA())}function jo(n,a){if(1&n&&(t.TgZ(0,"td",27),t.TgZ(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function ts(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Remote Balance (Sats) "),t.qZA())}function es(n,a){if(1&n&&(t.TgZ(0,"td",27),t.TgZ(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function ns(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",30),t.TgZ(1,"div",31),t.TgZ(2,"mat-select",32),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",33),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function is(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",34),t.TgZ(1,"button",35),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function as(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No pending channel available."),t.qZA())}function os(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting pending channels..."),t.qZA())}function ss(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function ls(n,a){if(1&n&&(t.TgZ(0,"td",36),t.YNc(1,as,2,0,"p",37),t.YNc(2,os,2,0,"p",37),t.YNc(3,ss,2,1,"p",37),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const rs=function(n){return{"display-none":n}};function cs(n,a){if(1&n&&t._UZ(0,"tr",38),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,rs,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function us(n,a){1&n&&t._UZ(0,"tr",39)}function ps(n,a){1&n&&t._UZ(0,"tr",40)}const ms=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},ds=function(){return["no_channel"]};let hs=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.commonService=o,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["state","alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.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(_.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.pendingChannels=e.pendingChannels,this.loadChannelsTable(),this.logger.info(e)}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.pendingChannels.length>0&&this.loadChannelsTable()}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{channel:e,channelsType:"pending",component:ot}}}))}loadChannelsTable(){this.pendingChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...this.pendingChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-pending-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("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,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3),t.TgZ(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,Vo,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,Go,2,0,"th",10),t.YNc(11,Xo,3,3,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,$o,2,0,"th",10),t.YNc(14,Wo,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Ko,2,0,"th",14),t.YNc(17,jo,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,ts,2,0,"th",14),t.YNc(20,es,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,ns,6,0,"th",17),t.YNc(23,is,3,0,"td",18),t.BQk(),t.ynx(24,19),t.YNc(25,ls,4,3,"td",20),t.BQk(),t.YNc(26,cs,1,3,"tr",21),t.YNc(27,us,1,0,"tr",22),t.YNc(28,ps,1,0,"tr",23),t.qZA(),t.qZA(),t._UZ(29,"mat-paginator",24),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,ms,""!==i.errorMessage)),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(13,ds)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,k.gD,k.$L,Q.ey,q.lW,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.rS,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var st=g(4290);const gs=["peersForm"],fs=["stepper"];function _s(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.peerFormLabel)}}function Cs(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Address is required."),t.qZA())}function xs(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.peerConnectionError)}}function ys(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.channelFormLabel)}}function Zs(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function Ts(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount must be a positive number."),t.qZA())}function As(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function Ls(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.channelConnectionError)}}let vs=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.formBuilder=s,this.actions=c,this.logger=f,this.faExclamationTriangle=Z.eHv,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 d.x,new d.x]}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:["",[m.kI.required]],peerAddress:[this.peerAddress,[m.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[m.kI.required,m.kI.min(1),m.kI.max(this.totalBalance)]],isPrivate:[!1],feeRate:[null],hiddenAmount:["",[m.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.NEWLY_ADDED_PEER_ECL||e.type===l.lr.FETCH_CHANNELS_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.NEWLY_ADDED_PEER_ECL&&(this.logger.info(e.payload),this.flgEditable=!1,this.newlyAddedPeer=e.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),e.type===l.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&("SaveNewPeer"===e.payload.action?this.peerConnectionError=e.payload.message:"SaveNewChannel"===e.payload.action&&(this.channelConnectionError=e.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,O.El)({payload:{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((0,O.YX)({payload:{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(e){switch(e.selectedIndex){default: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)"}e.selectedIndex{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(b.yh),t.Y36(m.qu),t.Y36(B.eX),t.Y36(R.mQ))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-connect-peer"]],viewQuery:function(e,i){if(1&e&&(t.Gf(gs,5),t.Gf(fs,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.stepper=o.first)}},decls:50,vars:20,consts:[["fxLayout","row"],["fxFlex","100"],["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,"padding-gap-x-large"],["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",""],["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-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/vByte)","type","number","name","feeRate","tabindex","7",3,"step","min"],["mat-button","","color","primary","tabindex","8","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t.TgZ(2,"mat-card-header",2),t.TgZ(3,"div",3),t.TgZ(4,"span",4),t._uU(5,"Connect to a new peer"),t.qZA(),t.qZA(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA(),t.qZA(),t.TgZ(8,"mat-card-content",6),t.TgZ(9,"div",7),t.TgZ(10,"mat-vertical-stepper",8,9),t.NdJ("selectionChange",function(s){return i.stepSelectionChanged(s)}),t.TgZ(12,"mat-step",10),t.TgZ(13,"form",11),t.YNc(14,_s,1,1,"ng-template",12),t.TgZ(15,"mat-form-field",1),t._UZ(16,"input",13),t.YNc(17,Cs,2,0,"mat-error",14),t.qZA(),t.YNc(18,xs,4,2,"div",15),t.TgZ(19,"div",16),t.TgZ(20,"button",17),t.NdJ("click",function(){return i.onConnectPeer()}),t._uU(21),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(22,"mat-step",10),t.TgZ(23,"form",18),t.YNc(24,ys,1,1,"ng-template",19),t.TgZ(25,"div",20),t.TgZ(26,"div",21),t.TgZ(27,"mat-form-field",22),t._UZ(28,"input",23),t.TgZ(29,"mat-hint"),t._uU(30),t.qZA(),t.TgZ(31,"span",24),t._uU(32," Sats "),t.qZA(),t.YNc(33,Zs,2,0,"mat-error",14),t.YNc(34,Ts,2,0,"mat-error",14),t.YNc(35,As,2,1,"mat-error",14),t.qZA(),t.TgZ(36,"div",25),t.TgZ(37,"mat-slide-toggle",26),t._uU(38,"Private Channel"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(39,"div",27),t.TgZ(40,"div",28),t.TgZ(41,"mat-form-field",1),t._UZ(42,"input",29),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.YNc(43,Ls,4,2,"div",15),t.TgZ(44,"div",16),t.TgZ(45,"button",30),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(46),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(47,"div",31),t.TgZ(48,"button",32),t.NdJ("click",function(){return i.onClose()}),t._uU(49),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(10),t.Q6J("linear",!0),t.xp6(2),t.Q6J("stepControl",i.peerFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.peerFormGroup),t.xp6(4),t.Q6J("ngIf",null==i.peerFormGroup.controls.peerAddress.errors?null:i.peerFormGroup.controls.peerAddress.errors.required),t.xp6(1),t.Q6J("ngIf",""!==i.peerConnectionError),t.xp6(3),t.Oqu(""!==i.peerConnectionError?"Retry":"Add Peer"),t.xp6(1),t.Q6J("stepControl",i.channelFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.channelFormGroup),t.xp6(5),t.Q6J("step",1e3),t.xp6(2),t.hij("Remaining Bal: ",i.totalBalance-(i.channelFormGroup.controls.fundingAmount.value?i.channelFormGroup.controls.fundingAmount.value:0),""),t.xp6(3),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.min),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.max),t.xp6(7),t.Q6J("step",1)("min",0),t.xp6(1),t.Q6J("ngIf",""!==i.channelConnectionError),t.xp6(3),t.Oqu(""!==i.channelConnectionError?"Retry":"Open Channel"),t.xp6(3),t.Oqu(null!=i.newlyAddedPeer&&i.newlyAddedPeer.nodeId?"Do It Later":"Close"))},directives:[p.xw,p.yH,A.dk,p.Wh,q.lW,A.dn,st.Vq,st.C0,m._Y,m.JL,m.sg,st.VY,x.KE,U.Nt,m.Fj,X.h,m.JJ,m.u,m.Q7,u.O5,m.wV,x.bx,x.R9,At.Rr,m.qQ,$.q,x.TO,I.BN],styles:[""]}),n})();function bs(n,a){1&n&&t._UZ(0,"mat-progress-bar",35)}function Ss(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," ID "),t.qZA())}const St=function(n){return{"max-width":n}};function ws(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(2,St,i.screenSize===i.screenSizeEnum.XS?"10rem":"30rem")),t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function Es(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," Alias "),t.qZA())}const wt=function(n){return{"mr-0":n}};function qs(n,a){if(1&n&&t._UZ(0,"span",42),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,wt,e.screenSize===e.screenSizeEnum.XS))}}function Is(n,a){if(1&n&&t._UZ(0,"span",43),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,wt,e.screenSize===e.screenSizeEnum.XS))}}function Fs(n,a){if(1&n&&(t.TgZ(0,"td",39),t.YNc(1,qs,1,3,"span",40),t.YNc(2,Is,1,3,"span",41),t._uU(3),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(4,St,i.screenSize===i.screenSizeEnum.XS?"10rem":"25rem")),t.xp6(1),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state),t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function Os(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," State "),t.qZA())}function Rs(n,a){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.state," ")}}function Ns(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," Network Address "),t.qZA())}function ks(n,a){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.address," ")}}function Ps(n,a){1&n&&(t.TgZ(0,"th",36),t._uU(1," Channels "),t.qZA())}function Ds(n,a){if(1&n&&(t.TgZ(0,"td",44),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.channels," ")}}function Us(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",45),t.TgZ(1,"div",46),t.TgZ(2,"mat-select",47),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",48),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Ms(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",48),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onPeerDetach(o)}),t._uU(1,"Disconnect"),t.qZA()}}function Js(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",48),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onConnectPeer(o)}),t._uU(1,"Reconnect"),t.qZA()}}function Ys(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",49),t.TgZ(1,"div",46),t.TgZ(2,"mat-select",47),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",48),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onPeerClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",48),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onOpenChannel(s)}),t._uU(7,"Open Channel"),t.qZA(),t.YNc(8,Ms,2,0,"mat-option",50),t.YNc(9,Js,2,0,"mat-option",50),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(8),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state)}}function Qs(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No connected peer."),t.qZA())}function Hs(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting peers..."),t.qZA())}function Bs(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function zs(n,a){if(1&n&&(t.TgZ(0,"td",51),t.YNc(1,Qs,2,0,"p",52),t.YNc(2,Hs,2,0,"p",52),t.YNc(3,Bs,2,1,"p",52),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Vs=function(n){return{"display-none":n}};function Gs(n,a){if(1&n&&t._UZ(0,"tr",53),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Vs,(null==e.peers?null:e.peers.data)&&(null==e.peers||null==e.peers.data?null:e.peers.data.length)>0))}}function Xs(n,a){1&n&&t._UZ(0,"tr",54)}function $s(n,a){1&n&&t._UZ(0,"tr",55)}const Ws=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Ks=function(){return["no_peer"]};let js=(()=>{class n{constructor(e,i,o,s,c){this.logger=e,this.store=i,this.rtlEffects=o,this.actions=s,this.commonService=c,this.faUsers=Z.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","actions"]):this.screenSize===l.cu.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(_.yD).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.peersData=e.peers,this.loadPeersTable(this.peersData),this.logger.info(e)}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.availableBalance=e.onchainBalance.total||0}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_PEERS_ECL)).subscribe(e=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(e,i){const o=[[{key:"nodeId",value:e.nodeId,title:"Public Key",width:100}],[{key:"address",value:e.address,title:"Address",width:50},{key:"alias",value:e.alias,title:"Alias",width:50}],[{key:"state",value:this.commonService.titleCase(e.state),title:"State",width:50},{key:"channels",value:e.channels,title:"Channels",width:50}]];this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:e.nodeId,message:o}}}))}onConnectPeer(e){this.store.dispatch((0,v.qR)({payload:{data:{message:{peer:e.nodeId?e:null,information:this.information,balance:this.availableBalance},component:vs}}}))}onOpenChannel(e){this.store.dispatch((0,v.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:e,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:vt}}}))}onPeerDetach(e){this.store.dispatch(e.channels>0?(0,v.qR)({payload:{data:{type:l.n_.ERROR,alertTitle:"Disconnect Not Allowed",titleMessage:"Channel active with this peer."}}}):(0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(e.alias?e.alias:e.nodeId),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(i=>{i&&this.store.dispatch((0,O.GD)({payload:{nodeId:e.nodeId}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(e){this.peers=new r.by(e?[...e]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.peers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(K.V),t.Y36(B.eX),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Peers")}])],decls:42,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["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,"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,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","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-1",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"form",1,2),t.TgZ(3,"button",3),t.NdJ("click",function(){return i.onConnectPeer({})}),t._uU(4,"Add Peer"),t.qZA(),t.qZA(),t.TgZ(5,"div",4),t.TgZ(6,"div",5),t.TgZ(7,"div",6),t._UZ(8,"fa-icon",7),t.TgZ(9,"span",8),t._uU(10,"Peers"),t.qZA(),t.qZA(),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"div",10),t.TgZ(13,"input",11),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.qZA(),t.TgZ(14,"div",12),t.YNc(15,bs,1,0,"mat-progress-bar",13),t.TgZ(16,"table",14,15),t.ynx(18,16),t.YNc(19,Ss,2,0,"th",17),t.YNc(20,ws,2,4,"td",18),t.BQk(),t.ynx(21,19),t.YNc(22,Es,2,0,"th",20),t.YNc(23,Fs,4,6,"td",21),t.BQk(),t.ynx(24,22),t.YNc(25,Os,2,0,"th",17),t.YNc(26,Rs,2,1,"td",23),t.BQk(),t.ynx(27,24),t.YNc(28,Ns,2,0,"th",17),t.YNc(29,ks,2,1,"td",23),t.BQk(),t.ynx(30,25),t.YNc(31,Ps,2,0,"th",17),t.YNc(32,Ds,2,1,"td",23),t.BQk(),t.ynx(33,26),t.YNc(34,Us,6,0,"th",27),t.YNc(35,Ys,10,2,"td",28),t.BQk(),t.ynx(36,29),t.YNc(37,zs,4,3,"td",30),t.BQk(),t.YNc(38,Gs,1,3,"tr",31),t.YNc(39,Xs,1,0,"tr",32),t.YNc(40,$s,1,0,"tr",33),t.qZA(),t.qZA(),t._UZ(41,"mat-paginator",34),t.qZA(),t.qZA()),2&e&&(t.xp6(8),t.Q6J("icon",i.faUsers),t.xp6(5),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.peers)("ngClass",t.VKq(12,Ws,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,Ks)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,m._Y,m.JL,m.F,q.lW,I.BN,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,z.gM,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-nodeId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:2rem}.mat-column-address[_ngcontent-%COMP%]{flex:1 1 15%;width:15%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const tl=["queryRoutesForm"];function el(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Destination Node ID is required."),t.qZA())}function nl(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function il(n,a){1&n&&t._UZ(0,"mat-progress-bar",31)}function al(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Alias "),t.qZA())}function ol(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function sl(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," ID "),t.qZA())}function ll(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function rl(n,a){1&n&&(t.TgZ(0,"th",34),t.TgZ(1,"span",35),t._uU(2,"Actions"),t.qZA(),t.qZA())}function cl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",36),t.TgZ(1,"button",37),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onHopClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function ul(n,a){1&n&&t._UZ(0,"tr",38)}function pl(n,a){1&n&&t._UZ(0,"tr",39)}const ml=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};let dl=(()=>{class n{constructor(e,i,o){this.store=e,this.eclEffects=i,this.commonService=o,this.nodeId="",this.amount=0,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=Z.FpQ,this.faExclamationTriangle=Z.eHv,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","actions"])}ngOnInit(){this.qrHops=new r.by([]),this.eclEffects.setQueryRoutes.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.qrHops.data=[],e&&e.length&&e.length>0?(this.flgLoading[0]=!1,this.qrHops=new r.by([...e]),this.qrHops.data=e):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null})}onQueryRoutes(){if(!this.nodeId||!this.amount)return!0;this.qrHops.data=[],this.flgLoading[0]=!0,this.store.dispatch((0,O.WO)({payload:{nodeId:this.nodeId,amount:1e3*this.amount}}))}resetData(){this.nodeId="",this.amount=0,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"alias",value:e.alias,title:"Alias",width:100,type:l.Gi.STRING}],[{key:"nodeId",value:e.nodeId,title:"Node ID",width:100,type:l.Gi.STRING}]]}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(b.yh),t.Y36(it.o),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-query-routes"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(tl,7)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:39,vars:16,consts:[["fxLayout","column","fxFlex","100"],["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-1"],["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,"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(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0),t.TgZ(1,"form",1,2),t.NdJ("ngSubmit",function(){return t.CHM(o),t.MAs(2).form.valid&&i.onQueryRoutes()}),t.TgZ(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span"),t._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),t.qZA(),t.qZA(),t.TgZ(7,"mat-form-field",5),t.TgZ(8,"input",6,7),t.NdJ("ngModelChange",function(c){return i.nodeId=c}),t.qZA(),t.YNc(10,el,2,0,"mat-error",8),t.qZA(),t.TgZ(11,"mat-form-field",9),t.TgZ(12,"input",10),t.NdJ("ngModelChange",function(c){return i.amount=c}),t.qZA(),t.YNc(13,nl,2,0,"mat-error",8),t.qZA(),t.TgZ(14,"div",11),t.TgZ(15,"button",12),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",13),t._uU(18,"Query Route"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(19,"div",14),t.TgZ(20,"div",15),t._UZ(21,"fa-icon",16),t.TgZ(22,"span",17),t._uU(23,"Transaction Route"),t.qZA(),t.qZA(),t.qZA(),t.TgZ(24,"div",18),t.YNc(25,il,1,0,"mat-progress-bar",19),t.TgZ(26,"table",20,21),t.ynx(28,22),t.YNc(29,al,2,0,"th",23),t.YNc(30,ol,2,1,"td",24),t.BQk(),t.ynx(31,25),t.YNc(32,sl,2,0,"th",23),t.YNc(33,ll,2,1,"td",24),t.BQk(),t.ynx(34,26),t.YNc(35,rl,3,0,"th",27),t.YNc(36,cl,3,0,"td",28),t.BQk(),t.YNc(37,ul,1,0,"tr",29),t.YNc(38,pl,1,0,"tr",30),t.qZA(),t.qZA(),t.qZA()}2&e&&(t.xp6(4),t.Q6J("icon",i.faExclamationTriangle),t.xp6(4),t.Q6J("ngModel",i.nodeId),t.xp6(2),t.Q6J("ngIf",!i.nodeId),t.xp6(2),t.Q6J("ngModel",i.amount)("step",1e3)("min",0),t.xp6(1),t.Q6J("ngIf",!i.amount),t.xp6(8),t.Q6J("icon",i.faRoute),t.xp6(4),t.Q6J("ngIf",!0===i.flgLoading[0]),t.xp6(1),t.Q6J("dataSource",i.qrHops)("ngClass",t.VKq(14,ml,"error"===i.flgLoading[0])),t.xp6(11),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns))},directives:[p.xw,p.yH,m._Y,m.JL,m.F,p.Wh,I.BN,x.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,u.O5,m.wV,m.qQ,$.q,q.lW,Y.$V,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.as,r.nj,x.TO,M.pW,r.ge,T.nU,r.ev,r.XQ,r.Gk],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}"]}),n})();function hl(n,a){1&n&&t._UZ(0,"mat-progress-bar",29)}function gl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," State "),t.qZA())}function fl(n,a){if(1&n&&(t.TgZ(0,"span",36),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function _l(n,a){if(1&n&&(t.TgZ(0,"span",38),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const Et=function(n){return{"max-width":n}};function Cl(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"div",32),t.YNc(2,fl,2,1,"span",33),t.YNc(3,_l,2,1,"span",34),t.TgZ(4,"span",35),t._uU(5),t.ALo(6,"titlecase"),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(6,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(t.lcZ(6,4,null==e?null:e.state))}}function xl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Short Channel ID "),t.qZA())}function yl(n,a){if(1&n&&(t.TgZ(0,"td",31),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.shortChannelId)}}function Zl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Alias "),t.qZA())}function Tl(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"div",32),t.TgZ(2,"span",35),t._uU(3),t.qZA(),t.qZA(),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(2),t.Oqu(e.alias)}}function Al(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Local Balance (Sats) "),t.qZA())}function Ll(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function vl(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Remote Balance (Sats) "),t.qZA())}function bl(n,a){if(1&n&&(t.TgZ(0,"td",31),t.TgZ(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Sl(n,a){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Balance Score "),t.qZA())}function wl(n,a){if(1&n&&(t.TgZ(0,"td",42),t.TgZ(1,"div",43),t.TgZ(2,"mat-hint",44),t._uU(3),t.ALo(4,"number"),t.qZA(),t.qZA(),t._UZ(5,"mat-progress-bar",45),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function El(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",46),t.TgZ(1,"div",47),t.TgZ(2,"mat-select",48),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function ql(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",50),t.TgZ(1,"div",51),t.TgZ(2,"mat-select",52),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",49),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(7,"Force Close"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function Il(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No inactive channel available."),t.qZA())}function Fl(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting inactive channels..."),t.qZA())}function Ol(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Rl(n,a){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,Il,2,0,"p",54),t.YNc(2,Fl,2,0,"p",54),t.YNc(3,Ol,2,1,"p",54),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Nl=function(n){return{"display-none":n}};function kl(n,a){if(1&n&&t._UZ(0,"tr",55),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Nl,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Pl(n,a){1&n&&t._UZ(0,"tr",56)}function Dl(n,a){1&n&&t._UZ(0,"tr",57)}const Ul=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Ml=function(){return["no_channel"]};let Jl=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.faEye=Z.Mdf,this.faEyeSlash=Z.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS||this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select(_.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.inactiveChannels=e.inactiveChannels,this.loadChannelsTable(),this.logger.info(e)}),this.store.select(_.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(_.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(_.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.inactiveChannels.length>0&&this.loadChannelsTable()}onChannelClose(e,i){this.store.dispatch((0,v.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:i?"Force Close Channel":"Close Channel",titleMessage:i?"Force closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId):"Closing channel: "+(e.alias||e.shortChannelId?e.alias&&e.shortChannelId?e.alias+" ("+e.shortChannelId+")":e.alias?e.alias:e.shortChannelId:e.channelId),noBtnText:"Cancel",yesBtnText:i?"Force Close":"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(f=>{f&&this.store.dispatch((0,O.BL)({payload:{channelId:e.channelId,force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLocaleLowerCase()}onChannelClick(e,i){this.store.dispatch((0,v.qR)({payload:{data:{channel:e,channelsType:"inactive",component:ot}}}))}loadChannelsTable(){this.inactiveChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...this.inactiveChannels]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,i)=>e[i]&&isNaN(e[i])?e[i].toLocaleLowerCase():e[i]?+e[i]:null,this.channels.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,this.applyFilter(),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(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(b.yh),t.Y36(K.V),t.Y36(F.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-inactive-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:36,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","shortChannelId"],["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","","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-1",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"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3),t.TgZ(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(5,"div",5),t.YNc(6,hl,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,gl,2,0,"th",10),t.YNc(11,Cl,7,8,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,xl,2,0,"th",10),t.YNc(14,yl,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Zl,2,0,"th",10),t.YNc(17,Tl,4,4,"td",11),t.BQk(),t.ynx(18,14),t.YNc(19,Al,2,0,"th",15),t.YNc(20,Ll,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,vl,2,0,"th",15),t.YNc(23,bl,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,Sl,2,0,"th",18),t.YNc(26,wl,6,4,"td",19),t.BQk(),t.ynx(27,20),t.YNc(28,El,6,0,"th",21),t.YNc(29,ql,8,0,"td",22),t.BQk(),t.ynx(30,23),t.YNc(31,Rl,4,3,"td",24),t.BQk(),t.YNc(32,kl,1,3,"tr",25),t.YNc(33,Pl,1,0,"tr",26),t.YNc(34,Dl,1,0,"tr",27),t.qZA(),t.qZA(),t._UZ(35,"mat-paginator",28),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,Ul,""!==i.errorMessage)),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(13,Ml)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,u.O5,r.BZ,T.YE,u.mk,S.oO,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,z.gM,I.BN,x.bx,k.gD,k.$L,Q.ey,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.rS,u.JJ],styles:[".mat-column-state[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-state[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 20%;width:20%}.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})(),Yl=(()=>{class n{transform(e,i){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(o,s)=>o.toUpperCase()).replace(/\s+/g,"").replace(/-/g," ")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=t.Yjl({name:"camelcase",type:n,pure:!0}),n})();function Ql(n,a){if(1&n&&(t.TgZ(0,"div",5),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function Hl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",6),t._UZ(1,"div",7),t.TgZ(2,"mat-form-field",8),t.TgZ(3,"input",9),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().filterValue=o})("input",function(){return t.CHM(e),t.oxw().applyFilter()})("keyup",function(){return t.CHM(e),t.oxw().applyFilter()}),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.filterValue)}}function Bl(n,a){1&n&&t._UZ(0,"mat-progress-bar",32)}function zl(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Date/Time"),t.qZA())}const Vl=function(n){return{"ml-0":n}};function Gl(n,a){if(1&n&&(t._UZ(0,"span",36),t.ALo(1,"camelcase")),2&n){const e=t.oxw().$implicit,i=t.oxw(2);t.s9C("matTooltip",t.lcZ(1,2,null==e?null:e.type)),t.Q6J("ngClass",t.VKq(4,Vl,i.screenSize===i.screenSizeEnum.XS))}}function Xl(n,a){if(1&n&&(t.TgZ(0,"td",34),t.YNc(1,Gl,2,6,"span",35),t._uU(2),t.ALo(3,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","payment-relayed"!==(null==e?null:e.type)),t.xp6(1),t.hij(" ",t.xi3(3,2,null==e?null:e.timestamp,"dd/MMM/YYYY HH:mm")," ")}}function $l(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"In Channel"),t.qZA())}const qt=function(n){return{"max-width":n}};function Wl(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,qt,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.fromChannelAlias)}}function Kl(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Out Channel"),t.qZA())}function jl(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,qt,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.toChannelAlias)}}function tr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount In (Sats)"),t.qZA())}function er(n,a){if(1&n&&(t.TgZ(0,"td",34),t.TgZ(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountIn))}}function nr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount Out (Sats)"),t.qZA())}function ir(n,a){if(1&n&&(t.TgZ(0,"td",34),t.TgZ(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountOut))}}function ar(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Fee Earned (Sats)"),t.qZA())}function or(n,a){if(1&n&&(t.TgZ(0,"td",34),t.TgZ(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,(null==e?null:e.amountIn)-(null==e?null:e.amountOut)))}}function sr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",40),t.TgZ(1,"div",41),t.TgZ(2,"mat-select",42),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",43),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA(),t.qZA(),t.qZA(),t.qZA()}}function lr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",44),t.TgZ(1,"button",45),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw(2).onForwardingEventClick(c,o)}),t._uU(2,"View Info"),t.qZA(),t.qZA()}}function rr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No forwarding history available."),t.qZA())}function cr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting forwarding history..."),t.qZA())}function ur(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function pr(n,a){if(1&n&&(t.TgZ(0,"td",46),t.YNc(1,rr,2,0,"p",47),t.YNc(2,cr,2,0,"p",47),t.YNc(3,ur,2,1,"p",47),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const mr=function(n){return{"display-none":n}};function dr(n,a){if(1&n&&t._UZ(0,"tr",48),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,mr,(null==e.forwardingHistoryEvents?null:e.forwardingHistoryEvents.data)&&(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)>0))}}function hr(n,a){1&n&&t._UZ(0,"tr",49)}function gr(n,a){1&n&&t._UZ(0,"tr",50)}const fr=function(){return["no_event"]};function _r(n,a){if(1&n&&(t.TgZ(0,"div",10),t.YNc(1,Bl,1,0,"mat-progress-bar",11),t.TgZ(2,"table",12,13),t.ynx(4,14),t.YNc(5,zl,2,0,"th",15),t.YNc(6,Xl,4,5,"td",16),t.BQk(),t.ynx(7,17),t.YNc(8,$l,2,0,"th",15),t.YNc(9,Wl,2,4,"td",18),t.BQk(),t.ynx(10,19),t.YNc(11,Kl,2,0,"th",15),t.YNc(12,jl,2,4,"td",18),t.BQk(),t.ynx(13,20),t.YNc(14,tr,2,0,"th",21),t.YNc(15,er,4,3,"td",16),t.BQk(),t.ynx(16,22),t.YNc(17,nr,2,0,"th",21),t.YNc(18,ir,4,3,"td",16),t.BQk(),t.ynx(19,23),t.YNc(20,ar,2,0,"th",21),t.YNc(21,or,4,3,"td",16),t.BQk(),t.ynx(22,24),t.YNc(23,sr,6,0,"th",25),t.YNc(24,lr,3,0,"td",26),t.BQk(),t.ynx(25,27),t.YNc(26,pr,4,3,"td",28),t.BQk(),t.YNc(27,dr,1,3,"tr",29),t.YNc(28,hr,1,0,"tr",30),t.YNc(29,gr,1,0,"tr",31),t.qZA(),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.forwardingHistoryEvents),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(6,fr)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}function Cr(n,a){if(1&n&&t._UZ(0,"mat-paginator",51),2&n){const e=t.oxw();t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let It=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.eventsData=[],this.filterValue="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","fee","actions"]):this.screenSize===l.cu.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(_.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{0===this.eventsData.length&&(this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.eventsData=e.payments&&e.payments.relayed?e.payments.relayed:[],this.eventsData.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.eventsData),this.logger.info(this.eventsData))})}ngAfterViewInit(){this.eventsData.length>0&&this.loadForwardingEventsTable(this.eventsData)}ngOnChanges(e){e.eventsData&&(this.apiCallStatus={status:l.Bn.COMPLETED,action:"FetchPayments"},this.eventsData=e.eventsData.currentValue,e.eventsData.firstChange||this.loadForwardingEventsTable(this.eventsData)),e.filterValue&&!e.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(e,i){const o=[[{key:"paymentHash",value:e.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"timestamp",value:Math.round(e.timestamp/1e3),title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"fee",value:e.amountIn-e.amountOut,title:"Fee Earned (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"amountIn",value:e.amountIn,title:"Amount In (Sats)",width:50,type:l.Gi.NUMBER},{key:"amountOut",value:e.amountOut,title:"Amount Out (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"fromChannelAlias",value:e.fromChannelAlias,title:"From Channel Alias",width:50,type:l.Gi.STRING},{key:"fromShortChannelId",value:e.fromShortChannelId,title:"From Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"fromChannelId",value:e.fromChannelId,title:"From Channel Id",width:100,type:l.Gi.STRING}],[{key:"toChannelAlias",value:e.toChannelAlias,title:"To Channel Alias",width:50,type:l.Gi.STRING},{key:"toShortChannelId",value:e.toShortChannelId,title:"To Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"To Channel Id",width:100,type:l.Gi.STRING}]];"payment-relayed"!==e.type&&o.unshift([{key:"type",value:this.commonService.camelCase(e.type),title:"Relay Type",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,v.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Event Information",message:o}}}))}loadForwardingEventsTable(e){this.forwardingHistoryEvents=new r.by([...e]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(i,o)=>"fee"===o?i.amountIn-i.amountOut:i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.forwardingHistoryEvents.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.forwardingHistoryEvents.paginator=this.paginator,this.applyFilter(),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-forwarding-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(T.YE,5),t.Gf(L.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Events")}]),t.TTD],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],["class","mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"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"],["mode","indeterminate",4,"ngIf"],["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"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot yellow","matTooltipPosition","right",3,"matTooltip","ngClass",4,"ngIf"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip","ngClass"],["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",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ql,2,1,"div",1),t.YNc(2,Hl,4,1,"div",2),t.YNc(3,_r,30,7,"div",3),t.YNc(4,Cr,1,3,"mat-paginator",4),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,r.BZ,T.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,M.pW,r.ge,T.nU,r.ev,z.gM,u.mk,S.oO,u.PC,S.Zl,k.gD,k.$L,Q.ey,q.lW,r.yh,r.Q2,r.XQ,r.Gk,L.NW],pipes:[u.uU,Yl,u.JJ],styles:[".mat-column-fromAlias[_ngcontent-%COMP%]{padding-left:2rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-toAlias[_ngcontent-%COMP%]{padding-left:1rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const xr=["tableIn"],yr=["tableOut"],Zr=["paginatorIn"],Tr=["paginatorOut"];function Ar(n,a){if(1&n&&(t.TgZ(0,"div",3),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function Lr(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function vr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}const j=function(n){return{"max-width":n}};function br(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function Sr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function wr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function Er(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function qr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function Ir(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function Fr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function Or(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function Rr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function Nr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No incoming routing peer available."),t.qZA())}function kr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting incoming routing peers..."),t.qZA())}function Pr(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Dr(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,Nr,2,0,"p",43),t.YNc(2,kr,2,0,"p",43),t.YNc(3,Pr,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersIncoming&&e.RoutingPeersIncoming.data)||(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersIncoming&&e.RoutingPeersIncoming.data)||(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersIncoming&&e.RoutingPeersIncoming.data)||(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}const Ft=function(n){return{"display-none":n}};function Ur(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Ft,(null==e.RoutingPeersIncoming?null:e.RoutingPeersIncoming.data)&&(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)>0))}}function Mr(n,a){1&n&&t._UZ(0,"tr",45)}function Jr(n,a){1&n&&t._UZ(0,"tr",46)}function Yr(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function Qr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}function Hr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function Br(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function zr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,j,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function Vr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function Gr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function Xr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function $r(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function Wr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function Kr(n,a){if(1&n&&(t.TgZ(0,"td",40),t.TgZ(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA(),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function jr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No outgoing routing peer available."),t.qZA())}function tc(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting outgoing routing peers..."),t.qZA())}function ec(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function nc(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,jr,2,0,"p",43),t.YNc(2,tc,2,0,"p",43),t.YNc(3,ec,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersOutgoing&&e.RoutingPeersOutgoing.data)||(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.COMPLETED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersOutgoing&&e.RoutingPeersOutgoing.data)||(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("ngIf",(!(null!=e.RoutingPeersOutgoing&&e.RoutingPeersOutgoing.data)||(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)<1)&&e.apiCallStatus.status===e.apiCallStatusEnum.ERROR)}}function ic(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Ft,(null==e.RoutingPeersOutgoing?null:e.RoutingPeersOutgoing.data)&&(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)>0))}}function ac(n,a){1&n&&t._UZ(0,"tr",45)}function oc(n,a){1&n&&t._UZ(0,"tr",46)}const sc=function(n,a){return{"mt-2":n,"mt-1":a}},lc=function(){return["no_incoming_event"]},rc=function(n){return{"mt-2":n}},cc=function(){return["no_outgoing_event"]};function uc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",4),t.TgZ(1,"div",5),t.TgZ(2,"div",6),t.TgZ(3,"div",7),t._uU(4,"Incoming"),t.qZA(),t.TgZ(5,"mat-form-field",8),t.TgZ(6,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyIncomingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterIn=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(7,"div",10),t.YNc(8,Lr,1,0,"mat-progress-bar",11),t.TgZ(9,"table",12,13),t.ynx(11,14),t.YNc(12,vr,2,0,"th",15),t.YNc(13,br,2,4,"td",16),t.BQk(),t.ynx(14,17),t.YNc(15,Sr,2,0,"th",15),t.YNc(16,wr,2,4,"td",16),t.BQk(),t.ynx(17,18),t.YNc(18,Er,2,0,"th",19),t.YNc(19,qr,4,3,"td",20),t.BQk(),t.ynx(20,21),t.YNc(21,Ir,2,0,"th",19),t.YNc(22,Fr,4,3,"td",20),t.BQk(),t.ynx(23,22),t.YNc(24,Or,2,0,"th",19),t.YNc(25,Rr,4,3,"td",20),t.BQk(),t.ynx(26,23),t.YNc(27,Dr,4,3,"td",24),t.BQk(),t.YNc(28,Ur,1,3,"tr",25),t.YNc(29,Mr,1,0,"tr",26),t.YNc(30,Jr,1,0,"tr",27),t.qZA(),t.qZA(),t._UZ(31,"mat-paginator",28,29),t.qZA(),t.TgZ(33,"div",30),t.TgZ(34,"div",6),t.TgZ(35,"div",7),t._uU(36,"Outgoing"),t.qZA(),t.TgZ(37,"mat-form-field",8),t.TgZ(38,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterOut=o}),t.qZA(),t.qZA(),t.qZA(),t.TgZ(39,"div",31),t.YNc(40,Yr,1,0,"mat-progress-bar",11),t.TgZ(41,"table",32,33),t.ynx(43,14),t.YNc(44,Qr,2,0,"th",15),t.YNc(45,Hr,2,4,"td",16),t.BQk(),t.ynx(46,17),t.YNc(47,Br,2,0,"th",15),t.YNc(48,zr,2,4,"td",16),t.BQk(),t.ynx(49,18),t.YNc(50,Vr,2,0,"th",19),t.YNc(51,Gr,4,3,"td",20),t.BQk(),t.ynx(52,21),t.YNc(53,Xr,2,0,"th",19),t.YNc(54,$r,4,3,"td",20),t.BQk(),t.ynx(55,22),t.YNc(56,Wr,2,0,"th",19),t.YNc(57,Kr,4,3,"td",20),t.BQk(),t.ynx(58,34),t.YNc(59,nc,4,3,"td",24),t.BQk(),t.YNc(60,ic,1,3,"tr",25),t.YNc(61,ac,1,0,"tr",26),t.YNc(62,oc,1,0,"tr",27),t.qZA(),t._UZ(63,"mat-paginator",28,35),t.qZA(),t.qZA(),t.qZA()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngClass",t.WLB(22,sc,e.screenSize===e.screenSizeEnum.XS,e.screenSize===e.screenSizeEnum.SM)),t.xp6(4),t.Q6J("ngModel",e.filterIn),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersIncoming),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(25,lc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS),t.xp6(3),t.Q6J("ngClass",t.VKq(26,rc,e.screenSize!==e.screenSizeEnum.LG)),t.xp6(4),t.Q6J("ngModel",e.filterOut),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersOutgoing),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(28,cc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let pc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.routingPeersData=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","totalFee"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalFee"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalAmount","totalFee"]):(this.flgSticky=!0,this.displayedColumns=["channelId","alias","events","totalAmount","totalFee"])}ngOnInit(){this.store.select(_.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.routingPeersData=e.payments&&e.payments.relayed?e.payments.relayed:[],this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData),this.logger.info(e)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData)}loadRoutingPeersTable(e){if(e.length>0){const i=this.groupRoutingPeers(e);this.RoutingPeersIncoming=new r.by(i[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(i[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter()}groupRoutingPeers(e){const i=[],o=[];return e.forEach(s=>{const c=i.find(P=>P.channelId===s.fromChannelId),f=o.find(P=>P.channelId===s.toChannelId);c?(c.events++,c.totalAmount=+c.totalAmount+ +s.amountIn,c.totalFee=s.amountIn-s.amountOut+ +c.totalFee):i.push({channelId:s.fromChannelId,alias:s.fromChannelAlias,events:1,totalAmount:+s.amountIn,totalFee:s.amountIn-s.amountOut}),f?(f.events++,f.totalAmount=+f.totalAmount+ +s.amountOut,f.totalFee=s.amountIn-s.amountOut+ +f.totalFee):o.push({channelId:s.toChannelId,alias:s.toChannelAlias,events:1,totalAmount:+s.amountOut,totalFee:s.amountIn-s.amountOut})}),[this.commonService.sortDescByKey(i,"totalFee"),this.commonService.sortDescByKey(o,"totalFee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(xr,5,T.YE),t.Gf(yr,5,T.YE),t.Gf(Zr,5),t.Gf(Tr,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sortIn=o.first),t.iGM(o=t.CRH())&&(i.sortOut=o.first),t.iGM(o=t.CRH())&&(i.paginatorIn=o.first),t.iGM(o=t.CRH())&&(i.paginatorOut=o.first)}},features:[t._Bn([{provide:L.ye,useValue:(0,l.pt)("Peers")}])],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch","class","page-sub-title-container",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between stretch",1,"page-sub-title-container"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch",1,"mb-4"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start start","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",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"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch",1,"mb-4"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ar,2,1,"div",1),t.YNc(2,uc,65,29,"div",2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,u.mk,S.oO,x.KE,U.Nt,m.Fj,m.JJ,m.On,Y.$V,r.BZ,T.YE,r.w1,r.fO,r.Dz,r.mD,r.Ke,r.as,r.nj,L.NW,M.pW,r.ge,T.nU,r.ev,u.PC,S.Zl,r.yh,r.Q2,r.XQ,r.Gk],pipes:[u.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function mc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",7),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let dc=(()=>{class n{constructor(e){this.router=e,this.faChartBar=Z.koM,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Reports"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t.TgZ(7,"nav",5),t.YNc(8,mc,2,3,"div",6),t.qZA(),t._UZ(9,"router-outlet"),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartBar),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,N.BU,u.sg,y.lC,N.Nj,y.rH],styles:[""]}),n})();var Ot=g(4821),Rt=g(6831),Nt=g(3035);function hc(n,a){if(1&n&&(t.TgZ(0,"div",8),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.totalFeeSat),t.xp6(1),t.AsE("",t.xi3(2,3,e.totalFeeSat||0,"1.0-2")," Sats/",t.lcZ(3,6,e.filteredEventsBySelectedPeriod.length||0)," Events")}}function gc(n,a){1&n&&(t.TgZ(0,"div",9),t._uU(1,"No fee report for the selected period"),t.qZA())}function fc(n,a){if(1&n&&(t.TgZ(0,"span"),t.TgZ(1,"span",12),t._uU(2),t.ALo(3,"number"),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.ALo(6,"number"),t.qZA(),t.qZA()),2&n){const e=a.model;t.xp6(2),t.hij("Events: ",t.lcZ(3,2,e.extra.totalEvents||0),""),t.xp6(3),t.hij("Fee: ",t.xi3(6,4,e.value||0,"1.0-2"),"")}}function _c(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical",10),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,fc,7,7,"ng-template",null,11,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("view",e.view)("results",e.feeReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function Cc(n,a){if(1&n&&t._UZ(0,"rtl-ecl-forwarding-history",13),2&n){const e=t.oxw();t.Q6J("eventsData",e.filteredEventsBySelectedPeriod)("filterValue",e.eventFilterValue)}}let xc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.totalFeeSat=null,this.today=new Date(Date.now()),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=l.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(_.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.events=e.payments&&e.payments.relayed?e.payments.relayed:[],this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(e)}),this.commonService.containerSizeUpdated.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2]})}filterForwardingEvents(e,i){const o=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3);this.logger.info("Filtering Forwarding Events Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()+" To "+i.toLocaleString()),this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeSat=null,this.events&&this.events.length>0&&(this.events.forEach(c=>{Math.floor(c.timestamp/1e3)>=o&&Math.floor(c.timestamp/1e3)0&&"ngx-charts"===e.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(e){this.eventFilterValue=this.reportPeriod===l.op[1]?e.name+"/"+this.startDate.getFullYear():e.name.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(e){const i=Math.round(e.getTime()/1e3),o=[];if(this.logger.info("Fee Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(s=>{const c=new Date(s.timestamp).getMonth();return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s{const c=Math.floor((Math.floor(s.timestamp/1e3)-i)/this.secondsInADay);return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}return this.logger.info("Fee Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),o}onSelectionChange(e){const i=e.selDate.getMonth(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.gg[e].days+1:l.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.mQ),t.Y36(F.v),t.Y36(b.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-fee-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},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"],["class","one-color",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"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2),t.YNc(3,hc,4,8,"div",3),t.YNc(4,gc,2,0,"div",4),t.TgZ(5,"div",5),t.YNc(6,_c,3,11,"ngx-charts-bar-vertical",6),t.qZA(),t.TgZ(7,"div",5),t.YNc(8,Cc,1,2,"rtl-ecl-forwarding-history",7),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(1),t.Q6J("ngIf",i.feeReportData.length<=0||i.filteredEventsBySelectedPeriod.length<=0),t.xp6(2),t.Q6J("ngIf",i.feeReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(2),t.Q6J("ngIf",i.filteredEventsBySelectedPeriod.length>0))},directives:[p.xw,p.Wh,p.yH,Rt.D,u.O5,Nt.K$,It],pipes:[u.JJ],styles:[""],data:{animation:[Ot.J]}}),n})();var yc=g(6785);function Zc(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Paid ",t.xi3(2,2,e.transactionsReportSummary.amountPaidSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function Tc(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Received ",t.xi3(2,2,e.transactionsReportSummary.amountReceivedSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Ac(n,a){if(1&n&&(t.TgZ(0,"div",8),t.YNc(1,Zc,4,7,"div",9),t.YNc(2,Tc,4,7,"div",9),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.transactionsReportSummary),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.paymentsSelectedPeriod),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.invoicesSelectedPeriod)}}function Lc(n,a){1&n&&(t.TgZ(0,"div",11),t._uU(1,"No transactions report for the selected period"),t.qZA())}function vc(n,a){if(1&n&&(t.TgZ(0,"span",14),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=a.model;t.xp6(1),t.HOy("",e.name,": ",t.xi3(2,4,e.value||0,"1.0-2"),"/# ","Paid"===e.name?"Payments":"Invoices",": ",t.lcZ(3,7,(null==e.extra?null:e.extra.total)||0),"")}}function bc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical-2d",12),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,vc,4,9,"ng-template",null,13,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("view",e.view)("results",e.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",e.reportPeriod===e.scrollRanges[0]?2:8)}}function Sc(n,a){if(1&n&&t._UZ(0,"rtl-transactions-report-table",15),2&n){const e=t.oxw();t.Q6J("dataList",e.transactionsNonZeroReportData)("dataRange",e.reportPeriod)("filterValue",e.transactionFilterValue)}}let wc=(()=>{class n{constructor(e,i){this.commonService=e,this.store=i,this.scrollRanges=l.op,this.reportPeriod=l.op[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.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=l.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(_.PP).pipe((0,h.R)(this.unSubs[0]),(0,tt.M)(this.store.select(_.Ef))).subscribe(([e,i])=>{this.payments=e.payments.sent?e.payments.sent:[],this.invoices=i.invoices?i.invoices:[],(this.payments.length>0||this.invoices.length>0)&&(this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData())}),this.commonService.containerSizeUpdated.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2]})}onChartMouseUp(e){"svg"===e.srcElement.tagName&&e.srcElement.classList.length>0&&"ngx-charts"===e.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(e){this.transactionFilterValue=this.reportPeriod===l.op[1]?e.series.toString()+"/"+this.startDate.getFullYear():e.series.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(e,i){const o=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3),c=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const f=this.payments.filter(C=>Math.floor(C.firstPartTimestamp/1e3)>=o&&Math.floor(C.firstPartTimestamp/1e3)"received"===C.status&&C.timestamp>=o&&C.timestamp{const E=new Date(C.firstPartTimestamp).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+C.recipientAmount,c[E].series[0].value=c[E].series[0].value+C.recipientAmount,c[E].series[0].extra.total=c[E].series[0].extra.total+1,this.transactionsReportSummary}),P.map(C=>{const E=new Date(1e3*C.timestamp).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+C.amountSettled,c[E].series[1].value=c[E].series[1].value+C.amountSettled,c[E].series[1].extra.total=c[E].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let C=0;C{const E=Math.floor((Math.floor(C.firstPartTimestamp/1e3)-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+C.recipientAmount,c[E].series[0].value=c[E].series[0].value+C.recipientAmount,c[E].series[0].extra.total=c[E].series[0].extra.total+1,this.transactionsReportSummary}),P.map(C=>{const E=Math.floor((C.timestamp-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+C.amountSettled,c[E].series[1].value=c[E].series[1].value+C.amountSettled,c[E].series[1].extra.total=c[E].series[1].extra.total+1,this.transactionsReportSummary})}return c}prepareTableData(){return this.transactionsReportData.reduce((e,i)=>i.series[0].extra.total>0||i.series[1].extra.total>0?e.concat({date:i.date,amount_paid:i.series[0].value,num_payments:i.series[0].extra.total,amount_received:i.series[1].value,num_invoices:i.series[1].extra.total}):e,[])}onSelectionChange(e){const i=e.selDate.getMonth(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.gg[e].days+1:l.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(F.v),t.Y36(b.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-transactions-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},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"],["class","two-color",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"],[1,"two-color",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(e,i){1&e&&(t.TgZ(0,"div",0),t.TgZ(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2),t.YNc(3,Ac,3,3,"div",3),t.YNc(4,Lc,2,0,"div",4),t.TgZ(5,"div",5),t.YNc(6,bc,3,13,"ngx-charts-bar-vertical-2d",6),t.qZA(),t.TgZ(7,"div",5),t.YNc(8,Sc,1,3,"rtl-transactions-report-table",7),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(1),t.Q6J("ngIf",i.transactionsNonZeroReportData.length<=0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0))},directives:[p.xw,p.Wh,p.yH,Rt.D,u.O5,Nt.H5,yc.g],pipes:[u.JJ],styles:[""],data:{animation:[Ot.J]}}),n})();var w=g(3894),Ec=g(5704);function qc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",8),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}const Oc=y.Bz.forChild([{path:"",component:rt,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:wi,canActivate:[w.fY]},{path:"onchain",component:ua,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:Ua,canActivate:[w.fY]},{path:"send",component:Ma,canActivate:[w.fY]}]},{path:"connections",component:da,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:ao,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:zo,canActivate:[w.fY]},{path:"pending",component:hs,canActivate:[w.fY]},{path:"inactive",component:Jl,canActivate:[w.fY]}]},{path:"peers",component:js,data:{sweepAll:!1},canActivate:[w.fY]}]},{path:"transactions",component:ga,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:gt,canActivate:[w.fY]},{path:"invoices",component:dt,canActivate:[w.fY]}]},{path:"routing",component:_a,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:It,canActivate:[w.fY]},{path:"peers",component:pc,canActivate:[w.fY]}]},{path:"reports",component:dc,canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:xc,canActivate:[w.fY]},{path:"transactions",component:wc,canActivate:[w.fY]}]},{path:"graph",component:(()=>{class n{constructor(e){this.router=e,this.faSearch=Z.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){const e=this.links.find(i=>this.router.url.includes(i.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof y.Av)).subscribe(i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(y.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-graph"]],decls:11,vars:2,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"],["fxLayout","column"],["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(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Graph Lookups"),t.qZA(),t.qZA(),t.TgZ(4,"div",3),t.TgZ(5,"mat-card"),t.TgZ(6,"mat-card-content",4),t.TgZ(7,"nav",5),t.YNc(8,qc,2,3,"div",6),t.qZA(),t.TgZ(9,"div",7),t._UZ(10,"router-outlet"),t.qZA(),t.qZA(),t.qZA(),t.qZA()),2&e&&(t.xp6(1),t.Q6J("icon",i.faSearch),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,I.BN,A.a8,A.dn,N.BU,u.sg,p.yH,y.lC,N.Nj,y.rH],styles:[""]}),n})(),canActivate:[w.fY],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:Pa,canActivate:[w.fY]},{path:"queryroutes",component:dl,canActivate:[w.fY]}]},{path:"**",component:Ec.w}]}]);var Rc=g(3387);let Nc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n,bootstrap:[rt]}),n.\u0275inj=t.cJS({providers:[w.fY],imports:[[u.ez,Rc.m,Oc]]}),n})()}}]); \ No newline at end of file diff --git a/angular/index.html b/angular/index.html index ac23bf3c..4d82a51e 100644 --- a/angular/index.html +++ b/angular/index.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/angular/runtime.1e33a008846eee2d.js b/angular/runtime.2b7c60010dbc2ffd.js similarity index 94% rename from angular/runtime.1e33a008846eee2d.js rename to angular/runtime.2b7c60010dbc2ffd.js index d8104a0a..2e0d786f 100644 --- a/angular/runtime.1e33a008846eee2d.js +++ b/angular/runtime.2b7c60010dbc2ffd.js @@ -1 +1 @@ -(()=>{"use strict";var e,v={},g={};function r(e){var i=g[e];if(void 0!==i)return i.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(i,t,f,o)=>{if(!t){var a=1/0;for(n=0;n=o)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(s=!1,o0&&e[n-1][2]>o;n--)e[n]=e[n-1];e[n]=[t,f,o]},r.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return r.d(i,{a:i}),i},r.d=(e,i)=>{for(var t in i)r.o(i,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:i[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((i,t)=>(r.f[t](e,i),i),[])),r.u=e=>e+"."+{119:"fd44fa722359c380",142:"2d038d60292a09c8",314:"6f64b8d2d7662c1d",871:"027975287965ae24"}[e]+".js",r.miniCssF=e=>"styles.15e3ffcb5aa94cda.css",r.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={},i="RTLApp:";r.l=(t,f,o,n)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==o)for(var d=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tu=i=>(void 0===e&&(e={createScriptURL:t=>t},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e.createScriptURL(i))})(),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var n=r.o(e,f)?e[f]:void 0;if(0!==n)if(n)o.push(n[2]);else if(666!=f){var a=new Promise((l,c)=>n=e[f]=[l,c]);o.push(n[2]=a);var s=r.p+r.u(f),d=new Error;r.l(s,l=>{if(r.o(e,f)&&(0!==(n=e[f])&&(e[f]=void 0),n)){var c=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;d.message="Loading chunk "+f+" failed.\n("+c+": "+p+")",d.name="ChunkLoadError",d.type=c,d.request=p,n[1](d)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var i=(f,o)=>{var d,u,[n,a,s]=o,l=0;if(n.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(s)var c=s(r)}for(f&&f(o);l{"use strict";var e,v={},g={};function r(e){var i=g[e];if(void 0!==i)return i.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(i,t,f,o)=>{if(!t){var a=1/0;for(n=0;n=o)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(s=!1,o0&&e[n-1][2]>o;n--)e[n]=e[n-1];e[n]=[t,f,o]},r.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return r.d(i,{a:i}),i},r.d=(e,i)=>{for(var t in i)r.o(i,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:i[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((i,t)=>(r.f[t](e,i),i),[])),r.u=e=>e+"."+{119:"fd44fa722359c380",142:"ed7fc40bd089bbbb",314:"6f64b8d2d7662c1d",871:"d455809c35893640"}[e]+".js",r.miniCssF=e=>"styles.15e3ffcb5aa94cda.css",r.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={},i="RTLApp:";r.l=(t,f,o,n)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==o)for(var d=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tu=i=>(void 0===e&&(e={createScriptURL:t=>t},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e.createScriptURL(i))})(),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var n=r.o(e,f)?e[f]:void 0;if(0!==n)if(n)o.push(n[2]);else if(666!=f){var a=new Promise((l,c)=>n=e[f]=[l,c]);o.push(n[2]=a);var s=r.p+r.u(f),d=new Error;r.l(s,l=>{if(r.o(e,f)&&(0!==(n=e[f])&&(e[f]=void 0),n)){var c=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;d.message="Loading chunk "+f+" failed.\n("+c+": "+p+")",d.name="ChunkLoadError",d.type=c,d.request=p,n[1](d)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var i=(f,o)=>{var d,u,[n,a,s]=o,l=0;if(n.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(s)var c=s(r)}for(f&&f(o);l