2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-10-31 09:20:27 +00:00
RTL/frontend/564.4c2c9e355320b551.js

1 line
2.8 MiB
JavaScript
Raw Normal View History

2023-02-21 07:54:28 +00:00
(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[564],{9564:(ec,na,Lt)=>{"use strict";Lt.r(na),Lt.d(na,{CLNModule:()=>ea});var at=Lt(6895),ie=Lt(9116),T=Lt(8878),A=Lt(4650),n=Lt(1576),B=Lt(3162);function o(r,i){1&r&&A._UZ(0,"mat-progress-bar",3)}class s{constructor(i){this.router=i,this.loading=!1,this.router.events.subscribe(t=>{switch(!0){case t instanceof ie.OD:this.loading=!0;break;case t instanceof ie.m2:case t instanceof ie.gk:case t instanceof ie.Q3:this.loading=!1}})}}s.\u0275fac=function(i){return new(i||s)(A.Y36(ie.F0))},s.\u0275cmp=A.Xpm({type:s,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(i,t){1&i&&(A.TgZ(0,"div",0),A.YNc(1,o,1,0,"mat-progress-bar",1),A._UZ(2,"router-outlet",null,2),A.qZA()),2&i&&(A.xp6(1),A.Q6J("ngIf",t.loading))},dependencies:[at.O5,n.xw,n.Wh,n.yH,B.pW,ie.lC],data:{animation:[T.g]}});var l=Lt(7579),c=Lt(2722),u=Lt(1365),C=Lt(3396),f=Lt(2687),a=Lt(7731),h=Lt(9828),w=Lt(5043),E=Lt(9653),e=Lt(62),g=Lt(2216),d=Lt(5829),M=Lt(4859),Y=Lt(3546),v=Lt(782),p=Lt(7392),I=Lt(8255),D=Lt(3848),N=Lt(9300),F=Lt(8739),U=Lt(6308),y=Lt(671),O=Lt(5412),eA=Lt(429),gA=Lt(493),z=Lt(4006),lA=Lt(4144),cA=Lt(9549),EA=Lt(4385),MA=Lt(3238),CA=Lt(455),yA=Lt(266),DA=Lt(3390),J=Lt(6534);function BA(r,i){if(1&r&&(A.TgZ(0,"mat-option",27),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&r){const t=i.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(A.lcZ(2,2,t))}}function tA(r,i){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.invoiceError)}}function oA(r,i){if(1&r&&(A.TgZ(0,"div",28),A._UZ(1,"fa-icon",29),A.YNc(2,tA,2,1,"span",30),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.invoiceError)}}class vA{constructor(i,t,Q,iA,SA,mt){this.dialogRef=i,this.data=t,this.store=Q,this.decimalPipe=iA,this.commonService=SA,this.actions=mt,this.faExclamationTriangle=f.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.timeUnitEnum=a.Qk,this.timeUnits=a.LO,this.selTimeUnit=a.Qk.SECS,this.invoiceError="",this.unSubs=[new l.x,new l.x,new l.x,new l.x,new l.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(h.lw).pipe((0,c.R)(this.unSubs[0])).subscribe(i=>{this.selNode=i}),this.store.select(h.ey).pipe((0,c.R)(this.unSubs[1])).subscribe(i=>{this.information=i}),this.actions.pipe((0,c.R)(this.unSubs[2]),(0,N.h)(i=>i.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(i=>{i.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===i.payload.action&&(i.payload.status===a.Bn.ERROR&&(this.invoiceError=i.payload.message),i.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(i){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let t=this.expiry?this.expiry:a.$Y;this.selTimeUnit!==a.Qk.SECS&&this.expiry&&(t=this.commonService.convertTime(this.expiry,this.selTimeUnit,a.Qk.SECS)),this.store.dispatch((0,eA.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:t,private:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=a.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,c.R)(this.unSubs[3])).subscribe({next:i=>{this.invoiceValueHint="= "+i.symbol+this.decimalPipe.transform(i.OTHER,a.Xz.OTHER)+" "+i.unit},error:i=>{this.invoiceValueHint="Conversion Error: "+i}}))}onTimeUnitChange(