mirror of
https://github.com/Ride-The-Lightning/RTL
synced 2024-11-19 15:25:29 +00:00
1 line
2.8 MiB
JavaScript
1 line
2.8 MiB
JavaScript
|
(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[125],{7125:(Gl,Sr,Rt)=>{"use strict";Rt.r(Sr),Rt.d(Sr,{CLNModule:()=>SC});var at=Rt(6814),le=Rt(4190),U=Rt(5256),A=Rt(9212),n=Rt(3814),u=Rt(6007);function a(i,I){1&i&&A._UZ(0,"mat-progress-bar",3)}let o=(()=>{class i{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(l=>{switch(!0){case l instanceof le.OD:this.loading=!0;break;case l instanceof le.m2:case l instanceof le.gk:case l instanceof le.Q3:this.loading=!1}})}static#A=this.\u0275fac=function(l){return new(l||i)(A.Y36(le.F0))};static#t=this.\u0275cmp=A.Xpm({type:i,selectors:[["rtl-cln-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(l,g){1&l&&(A.TgZ(0,"div",0),A.YNc(1,a,1,0,"mat-progress-bar",1),A._UZ(2,"router-outlet",null,2),A.qZA()),2&l&&(A.xp6(1),A.Q6J("ngIf",g.loading))},dependencies:[at.O5,n.xw,n.Wh,n.yH,u.pW,le.lC],data:{animation:[U.g]}})}return i})();var s=Rt(8645),c=Rt(9773),f=Rt(2460),w=Rt(1449),B=Rt(590),r=Rt(2154),Q=Rt(4818),E=Rt(3468),C=Rt(5980),e=Rt(4221),h=Rt(6339),d=Rt(5597),D=Rt(7509),N=Rt(2296),m=Rt(5195),p=Rt(3176),x=Rt(617),F=Rt(7988),Y=Rt(4104),v=Rt(2181),T=Rt(1476),z=Rt(3566),y=Rt(5313),tA=Rt(8525),gA=Rt(7700),X=Rt(234),BA=Rt(5154),$=Rt(6223),CA=Rt(2032),mA=Rt(5683),yA=Rt(3680),NA=Rt(2599),JA=Rt(2596),j=Rt(6985),fA=Rt(6082);function rA(i,I){1&i&&(A.TgZ(0,"span",31),A._uU(1,"= "),A.qZA())}function nA(i,I){if(1&i&&(A.TgZ(0,"span",32),A._UZ(1,"fa-icon",33),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.convertedCurrency.symbol)}}function EA(i,I){if(1&i&&A._UZ(0,"span",34),2&i){const t=A.oxw();A.Q6J("innerHTML",t.convertedCurrency.symbol,A.oJD)}}function FA(i,I){if(1&i&&(A.TgZ(0,"mat-option",35),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&i){const t=I.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(A.lcZ(2,2,t))}}function OA(i,I){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const t=A.oxw(2);A.xp6(1),A.Oqu(t.invoiceError)}}function K(i,I){if(1&i&&(A.TgZ(0,"div",36),A._UZ(1,"fa-icon",37),A.YNc(2,OA,2,1,"span",38),A.qZA()),2&i){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.invoiceError)}}let R=(()=>{class i{constructor(t,l,g,V,LA,yt){this.dialogRef=t,this.data=l,this.store=g,this.decimalPipe=V,this.commonService=LA,this.actions=yt,this.faExclamationTriangle=B.eHv,this.convertedCurrency=null,this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=r.IV,this.timeUnitEnum=r.Qk,this.timeUnits=r.LO,this.selTimeUnit=r.Qk.SECS,this.invoiceError="",this.unSubs=[new s.x,new s.x,new s.x,new s.x,new s.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(Q.dT).pipe((0,c.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(E.ey).pipe((0,c.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,c.R)(this.unSubs[2]),(0,v.h)(t=>t.type===r.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===r.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===t.payload.action&&(t.payload.status===r.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===r.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let l=this.expiry?this.expiry:r.$Y;this.selTimeUnit!==r.Qk.SECS&&this.expiry&&(l=this.commonService.convertTime(this.expiry,this.selTimeUnit,r.Qk.SECS)),this.store.dispatch((0,X.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount_msat:this.invoiceValue?1e3*this.invoiceValue:"any",description:this.description,expiry:l,exposeprivatechannels:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=r.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.settings.fiatConversion&&(this.invoiceValueHint
|